Solr Filed General Type Properties

For Solr's General Properties, it applies to any Field Type. There are the following general properties:

 

Property Description Values
name    
class    
positionIncrementGap For multivalued fields, specifies a distance between multiple values,
which prevents spurious phrase matches
.
integer
autoGeneratePhraseQueries For text fields. If true, Solr automatically generates phrase queries for
adjacent terms. If false, terms must be enclosed in double-quotes to be treated as phrases. For text fields
(solr.TextField), if true, Solr automatically generates phrases Adjacent words generate phrase queries. If False, terms are divided into different phrases according to the TokenizerFactory.
true or
false
docValuesFormat Defines a custom DocValuesFormat to use for fields of this type. This requires that a schema-aware codec, such as the SchemaCodecFactory has been configured in solrconfig.xml.
定义DocValues的存储格式。
n/a
postingsFormat Defines a custom PostingsFormat to use for fields of this type.This requires that a schema-aware codec, such as the SchemaCodecFactory has been configured in solrconfig.xml. n/a


 

 

  1. PositionIncrementGap example:
Suppose a document has a multi-valued field called "author" with the value:
author: John Doe 
author: Bob Smith 
When PositionIncrementGap = 0, the query statement (Query): "doe bob", will match this Field, obviously this is not what you want to see, then PositionIncrementGap will solve this problem, such as:
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true"> </fieldType>
 
2. autoGeneratePhraseQueries, example:
<fieldType name="text_en_splitting" class="solr.TextField" autoGeneratePhraseQueries="true" positionIncrementGap="100">
</fieldType>

 
<fieldType name="text_ja" class="solr.TextField" autoGeneratePhraseQueries="false"></fieldType>
 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327073640&siteId=291194637