Skip to content
piaolingxue edited this page Apr 21, 2013 · 4 revisions

Welcome to the ik-analyzer wiki!

solr4.2配置

<!-- ik-analyzer 4.2.0-->
<fieldType name="text_ik" class="solr.TextField">
    <analyzer type="index" positionIncrementGap="100" autoGeneratePhraseQueries="true">
	    <tokenizer class="org.wltea.analyzer.solr.IKTokenizerFactory" useSmart="false"/>
	    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
	    <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
    <analyzer type="query">
	    <tokenizer class="org.wltea.analyzer.solr.IKTokenizerFactory" useSmart="true" />
	    <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>
Clone this wiki locally