solr学习之域的管理与中文分析器配置
<!--string 类型 在存储索引时不进行分词 sortMissingLast:设置为true时 没有该filed的数据将排在有该Field的数据后面,忽略请求时的排序规则,默认为false。--> <fieldType name="string" sortMissingLast="true" /><!-- boolean 类型只有两个值 true false-->
<fieldType name="boolean" sortMissingLast="true"/>
<!--用于直接数值搜索,该类型不分词-->
<fieldType name="int" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="double" precisionStep="0" positionIncrementGap="0"/>
<!--用于数值范围搜索,进行分词 通过设置precisionStep的值可以提高检索速度,8是solr的推荐值-->
<fieldType name="tint" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tfloat" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tlong" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tdouble" precisionStep="8" positionIncrementGap="0"/>
<!--日期类型-->
<fieldType name="date" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="tdate" precisionStep="6" positionIncrementGap="0"/>
<!--二进制类型-->
<fieldtype name="binary"/>
<!--随机数类型-->
<fieldType name="random" indexed="true" />
<!-- text_general 类型 进行分词 -->
<fieldType name="text_general" positionIncrementGap="100">
<!--创建索引时的配置 -->
<analyzer type="index">
<!-- tokenizer 创建索引使用的分词器 -->
<tokenizer/>
<!--filter分词时的过滤器 处理停用词 words:配置停用词-->
<filter ignoreCase="true" words="stopwords.txt" />
<!-- filter分词时的过滤器处理大小写转换问题(将大写转小写)-->
<filter/>
</analyzer>
<!--查询索引时的配置 -->
<analyzer type="query">
<!-- tokenizer 对查询条件分词时使用的分词器 -->
<tokenizer/>
<!--filter分词时的过滤器 处理停用词 words:配置停用词-->
<filter ignoreCase="true" words="stopwords.txt" />
<!--filter分词时的过滤器 处理同义词 synonyms:配置同义词-->
<filter synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<!-- filter分词时的过滤器处理大小写转换问题(将大写转小写)-->
<filter/>
</analyzer>
</fieldType>
页:
[1]