Update README.md

This commit is contained in:
Magese 2018-05-10 14:40:54 +08:00 committed by GitHub
parent f59cb0786f
commit 814ac4d78a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 15 deletions

View File

@ -21,21 +21,19 @@ ik-analyzer for solr7.x
</li>
<li>
<p>3. 配置solr的managed-schema添加ik分词器示例如下</p>
       <pre>
       &lt;!-- ik分词器 --&gt;
&lt;fieldType name="text_ik" class="solr.TextField"&gt;
&lt;analyzer type="index"&gt;
&lt;tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" isMaxWordLength="false" useSmart="false"
conf="ik.conf"/&gt;
&lt;filter class="solr.LowerCaseFilterFactory"/&gt;
&lt;/analyzer&gt;
&lt;analyzer type="query"&gt;
&lt;tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" isMaxWordLength="true" useSmart="true"
conf="ik.conf"/&gt;
&lt;filter class="solr.LowerCaseFilterFactory"/&gt;
&lt;/analyzer&gt;
&lt;/fieldType&gt;
</pre>
<pre>
&lt;!-- ik分词器 --&gt;
&lt;fieldType name="text_ik" class="solr.TextField"&gt;
&lt;analyzer type="index"&gt;
&lt;tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" isMaxWordLength="false" useSmart="false" conf="ik.conf"/&gt;
&lt;filter class="solr.LowerCaseFilterFactory"/&gt;
&lt;/analyzer&gt;
&lt;analyzer type="query"&gt;
&lt;tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" isMaxWordLength="true" useSmart="true" conf="ik.conf"/&gt;
&lt;filter class="solr.LowerCaseFilterFactory"/&gt;
&lt;/analyzer&gt;
&lt;/fieldType&gt;
</pre>
</li>
<li>
<p>4. 启动solr服务测试分词</p>