hankcs / hanlp-lucene-plugin

HanLP中文分词Lucene插件,支持包括Solr在内的基于Lucene的系统
http://www.hankcs.com/nlp/segment/full-text-retrieval-solr-integrated-hanlp-chinese-word-segmentation.html
Apache License 2.0
296 stars 99 forks source link

新手求助,如何安装插件? #26

Open kent119 opened 7 years ago

kent119 commented 7 years ago

公司用的是 solr 6.6.0

我看到安装这个插件需要修改 schema.xml, 但是貌似新版本的schema.xml是动态生成的,而且在mycore里面也找不到这个文件。请问这种情况怎么办?

修改solr core的配置文件${core}/conf/schema.xml

iluvsnail commented 6 years ago

可以修改的,修改managed-schema这个文件就行

suyuanhxx commented 6 years ago

将solrconfig中的schemaFactory 改成<schemaFactory class="ClassicIndexSchemaFactory"/>,然后再修改schema.xm,官方具体说明: https://lucene.apache.org/solr/guide/6_6/schema-factory-definition-in-solrconfig.html