一些默认的可指定的属性, 不管是在filed types, 或者是自定义的field上, 都可以被重写。 属性的默认值依赖于FieldType class, 然而Fieldtype class也同时依赖于shcema 的version. 下面的table 是针对version="1.6" 的fieldType.
Property | Description | Values | Default |
indexed | If true, the value of the field can be used in queries to retrieve matching documents | true or false |
true |
stored | If true, the actual value of the field can be retrieved by queries. 如果为true, 实际值域能被查询检索到 |
true or false |
true |
docValues | If true, the value of the field will be put in a column-oriented DocValues structure. 如果为true, 面向列的储存, 为sorting, grouping提高效率。 |
true or false |
false |
sortMissingFirst sortMissingLast |
Control the placement of documents when a sort field is not present. sortMissingLast: 设置成true没有该field的数据排在有该field的数据之后,而不管请求时的排序规则。 sortMissingFirst: 与sortMissingLast相反 |
true or false |
false |
multiValued | If true, indicates that a single document might contain multiple values for this field type. 一个域含有多个值。 |
true or false |
false |
omitNorms | If true, omits the norms associated with this field (this disables length normalization and index-time boosting for the field, and saves some memory). Defaults to true for all primitive (non-analyzed) field types, such as int, float,data, bool, and string. Only full-text fields or fields that need an index-time boost need norms. 如果为true, 这将禁用域的长度规范化和索引加权, 有利于节省内存开销。 当field type是基本数据类型, 默认为true. 实际上只有全文索引或在index的时候要加权的field需要norm。 |
true or false |
* |
omitTermFreqAndPositions | If true, omits term frequency, positions, and payloads from postings for this field. This can be a performance boost for fields that don't require that information. It also reduces the storage space required for the index. Queries that rely on position that are issued on a field with this option will silently fail to find documents. This property defaults to true for all field types that are not text fields. 如果为true, 将去除在这个field上词频,地址,payload。 这会提高评分效率, 同时也会减少索引储存空间。但是依靠地址查询的query找不到相应的document.除开text field, 其它的field默认的属性为true. 主要是用于不需要term在Doc里的词频,地址信息, 只要通过term得到Doc就行了。 |
true or false |
* |
omitPositions | Similar to omitTermFreqAndPositions but preserves term frequency information. 和omitTermFreqAndPositions功能相似, 但保留词频信息 |
true or false |
* |
termVectors termPositions termOffsets termPayloads |
These options instruct Solr to maintain full term vectors for each document, optionally including position, offset and payload information for each term occurrence in those vectors. These can be used to accelerate highlighting and other ancillary functionality, but impose a substantial cost in terms of index size. They are not necessary for typical uses of Solr。 这些选项说明了所有term vectors的信息, 包含有地址信息,偏移量,paylod。 这会加快highlighting 和其它辅助功能, 但是也加大了索引的开销。 对于特殊使用的solr是没有必要的。 |
true or false |
false |
required | Instructs Solr to reject any attempts to add a document which does not have a value for this field. This property defaults to false. | true or false |
false |
useDocValuesAsStored | If the field has docValues enabled, setting this to true would allow the field to be returned as if it were a stored field (even if it has stored=false) when matching "*" in an fl parameter. 如果这个field启动了docValues, 并且useDocValuesAsStored为true, 那么允许这个field值被返回到客户端, 不管stored=false. |
true or false |
true |
相关推荐
string value = Properties.Settings.Default.FieldName; // FieldName 是在“Settings.settings”文件中定义的设置名 ``` 3. **修改设置**: ```csharp Properties.Settings.Default.FieldName = "new value";...
types (int, float, bool, char, string, multi-dimensional array, enum, variant), classes (with methods, events, properties, index and default properties). Strict type checking. Multi-language ...
types (int, float, bool, char, string, multi-dimensional array, enum, variant), classes (with methods, events, properties, index and default properties). Strict type checking. Multi-language ...
types (int, float, bool, char, string, multi-dimensional array, enum, variant), classes (with methods, events, properties, index and default properties). Strict type checking. Multi-language ...
types (int, float, bool, char, string, multi-dimensional array, enum, variant), classes (with methods, events, properties, index and default properties). - Strict type checking. - Multi-language ...
mappingRequest.source("{ \"properties\": { \"field_name\": { \"type\": \"text\" } } }", XContentType.JSON); client.indices().putMapping(mappingRequest, RequestOptions.DEFAULT); ``` 3. **文档插入**:...
xwork.default.invalid.fieldvalue={0} 错误 invalid.fieldvalue.age=年龄是错误的~~~ ``` 然后,在Action的配置中,通过`<field-validators>`标签定义字段的验证规则: ```xml <field-name>age</field-name>...
default: type: ik_max_word ``` 这段配置指定了默认的分析器为IK的最大切词模式,适用于全文检索。如果需要自定义分词规则,可以在 IK 分词器的配置中添加自定义词典,如: ```yaml spring: data: elastic...
<package name="default" namespace="/" extends="struts-default"> <default-interceptor-ref name="defaultStack"/> ``` #### 六、国际化支持 Struts2支持多语言环境,可以通过资源文件进行国际化配置。 1...
xwork.default.invalid.fieldvalue={0} 错误 ``` #### 五、基于XML的验证规则 除了在Action类中直接实现 `validate()` 方法外,还可以通过XML文件来定义验证规则。例如,在 `PointAction-validation.xml` 文件中...
接下来,FilterDispatcher会根据配置文件struts.configration.files加载Struts的三种配置文件:struts.xml、struts.properties和default.properties。当客户端提交请求到Web容器后,请求会由FilterDispatcher过滤,...
<package name="default" namespace="/" extends="struts-default"> <result name="success">/WEB-INF/hello.jsp ``` ##### 2. **struts.properties** - **位置**:同样位于 `WEB-INF/classes` 目录下...
mapping.get("properties").put("title", new HashMap()); mapping.get("properties").get("title").put("type", "text"); PutMappingRequest putMappingRequest = new PutMappingRequest("documents"); ...
在`src`目录下,通常会有一个`com/yourcompany/yourproject/validator/resource`目录,这个目录下存放的是资源文件,如`Validation.properties`。这个文件用于定义错误消息,当验证失败时,系统会读取这里的错误...
properties.[value] AS field_desc, dbo.systypes.name AS field_type, dbo.syscolumns.length AS field_size, ISNULL(COLUMNPROPERTY(dbo.syscolumns.id, dbo.syscolumns.name, 'Scale'), 0) AS field_...
- Using default font and size of Excel by setting Size = -1 and Font.Name = 'MS Sans Serif' -> Excel97/2003 : Arial size 10, Excel 2007 : Calibri size 11 - Tested with Turbo Delphi Explorer (Win32)...
<package name="default" namespace="/" extends="struts-default"> <result name="success">/WEB-INF/jsp/hello.jsp ``` 这里`helloWorld`是Action的名字,当用户访问`/helloWorld`时,Struts2将调用`...
- ADD: In TFlexPanel.DefaultLinkPoint property added Size field that lets define visual size of the connection points of the flex-connectors. Initialized with DefaultLinkPointSize constant in the ...
Configuration. Most configuration options are ...The files in the queue are posted one at a time, the file field name is 'file'. The handler should return json encoded object with following properties:
Common tasks like Add a Field, Modify a Property and Rename Local are all invoked with just one keystroke. Check a demo movie Beyond Templates demo movie with some editor enhancements. Advanced Code...