Can not use ICUTokenizerFactory in Solr

后端 未结 2 909
我寻月下人不归
我寻月下人不归 2021-01-03 07:32

I am trying to use ICUTokenizerFactory in Solr schema. This is how I have defined field and fieldType.



        
相关标签:
2条回答
  • 2021-01-03 08:08

    From the Wiki:

    Lucene provides support for segmenting these languages into syllables with solr.ICUTokenizerFactory in the analysis-extras contrib module. To use this tokenizer, see solr/contrib/analysis-extras/README.txt for instructions on which jars you need to add to your SOLR_HOME/lib

    0 讨论(0)
  • 2021-01-03 08:16

    Add this at the top of your solrconfig.xml:

    <config>
      <lib dir="${user.dir}/../contrib/analysis-extras/lucene-libs/" />
      <lib dir="${user.dir}/../contrib/analysis-extras/lib/" />
    

    This assumes that you are running from example directory with solr.solr.home set to your instance. Otherwise, just use absolute path to your Solr installation.

    You can also copy all those jars into lib directory (under your core, not solr home). But the above is an easier way.

    0 讨论(0)
提交回复
热议问题