Solr4.5+mmseg4j-1.9.1的简单配置
来源:互联网 发布:手机用户mac绑定错误 编辑:程序博客网 时间:2024/06/05 14:41
首先,将mmseg4j-1.9.1解压缩,将/dist下的三个jar包放入$tomcat_home/lib里
然后在\solr\collection1\conf中的schema.xml文件中加入如下代码:
<filed>标签中加入:
<field name="simple" type="textSimple" indexed="true" stored="true" multiValued="true"/> <field name="complex" type="textComplex" indexed="true" stored="true" multiValued="true"/> <field name="text_mmseg" type="textMaxWord" indexed="true" stored="true" multiValued="true"/>
</pre><pre code_snippet_id="365531" snippet_file_name="blog_20140527_3_1993842" name="code" class="html">
然后再<fieldType>标签中加入:
<fieldType name="textComplex" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="complex" dicPath="D:\tomcat-solr\solr\dic"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer></fieldType><fieldType name="textMaxWord" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="max-word" dicPath="D:\tomcat-solr\solr\dic"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer></fieldType><fieldType name="textSimple" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="simple" dicPath="D:\tomcat-solr\solr\dic"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer></fieldType>
最后,在<copyField>标签中加入:
<copyField source="simple" dest="text_mmseg"/> <copyField source="complex" dest="text_mmseg"/>
重新启动tomcat/solr,如果不报错就配置成功。
0 0
- Solr4.5+mmseg4j-1.9.1的简单配置
- solr4.5 mmseg4j 分词器配置
- solr4.5配置中文分词器mmseg4j
- solr4.5配置中文分词器mmseg4j
- solr4.5配置中文分词器mmseg4j
- solr4.5部署到tomcat以及solr4.5配置中文分词器mmseg4j
- Solr4.10.3中整合中文分词mmseg4j-1.9.1
- Solr4.7.0中整合中文分词mmseg4j-1.9.1
- solr与mmseg4j整合详细步骤(solr4.7.1和mmseg4j-1.9.1)
- solr学习(二)Solr4.7.2中整合中文分词mmseg4j-1.9.1
- solr4.4整合mmseg4j-1.9中文分词器
- Solr+MMSEG4J的简单学习
- solr4.4.0+mmseg4j 中文分词
- solr-5.4.1 和 mmseg4j-2.3.0版本的配置
- solr4.5配置tomcat7
- Solr4.6 的部署配置
- Solr4.10.2的Tomcat配置
- Solr4.10.2的Tomcat配置
- Raw-OS源码分析之事件标志
- POJ 3767 I Wanna Go Home 最短路
- GameServer
- shell中的特殊变量
- C程序调用shell脚本共有三种方法
- Solr4.5+mmseg4j-1.9.1的简单配置
- 浮点数float 处理注意事项
- Mahout0.9 – Clustering (聚类篇)
- JavaScript语法详解(四)__复合类型
- [leetcode]Divide Two Integers
- SecureCRT实用配置(转)
- 交通工具的未来
- 基于Ubuntu 14.04 LTS编译Android4.4.2源代码
- Poisson Distribution and American shooting rampage