1. 程式人生 > >solr 搜尋引擎搭建和使用 (二)

solr 搜尋引擎搭建和使用 (二)

<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">

<analyzer type="index">

  <tokenizer class="solr.StandardTokenizerFactory"/>

  <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />

  <filter class="solr.LowerCaseFilterFactory"/>

</analyzer>

<analyzer type="query">

  <tokenizer class="solr.StandardTokenizerFactory"/>

  <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />

  <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>

  <filter class="solr.LowerCaseFilterFactory"/>

</analyzer>

</fieldType>