solr6.6 配置同义词
1、配置managed-schema
<fieldType name="text_mmseg4j_simple" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<filter class="solr.SynonymGraphFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms-cn.txt"/>
<tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="simple"/>
</analyzer>
</fieldType>
<field name="text" type="text_mmseg4j_simple" termVectors="true" indexed="true" stored="true"/>
2、同义词文件synonyms-cn.txt
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License. #-----------------------------------------------------------------------
#some test synonym mappings unlikely to appear in real input text
aaafoo => aaabar
bbbfoo => bbbfoo bbbbar
cccfoo => cccbar cccbaz
fooaaa,baraaa,bazaaa # Some synonym groups specific to this example
GB,gib,gigabyte,gigabytes
MB,mib,megabyte,megabytes
Television, Televisions, TV, TVs
#notice we use "gib" instead of "GiB" so any WordDelimiterGraphFilter coming
#after us won't split it into two words. # Synonym mappings can be used for spelling correction too
pixima => pixma ideapad,ideacenter,lenovo,联想
china,中国,中华人民共和国,华夏,中国大陆
下面两种方式都可以
联想,ideapad,ideacenter,lenovo
联想 => ideapad,ideacenter,lenovo

3、索引文件搜索



solr6.6 配置同义词的更多相关文章
- solr6.6 配置拼音分词
参考:solr6.6 配置同义词 1.下载拼音分析包 下载地址:pinyin.zip 解压后放在core下面的lib文件夹下面: 2.修改managed-schema配置文件 <fieldTyp ...
- [大数据]-Logstash-5.3.1的安装导入数据到Elasticsearch5.3.1并配置同义词过滤
阅读此文请先阅读上文:[大数据]-Elasticsearch5.3.1 IK分词,同义词/联想搜索设置,前面介绍了ES,Kibana5.3.1的安装配置,以及IK分词的安装和同义词设置,这里主要记录L ...
- solr-用mmseg4j配置同义词索引和检索(IKanlyzer需要修改源码适应solr接口才能使用同义词功能)
概念说明:同义词大体的意思是指,当用户输入一个词时,solr会把相关有相同意思的近义词的或同义词的term的语段内容从索引中取出,展示给用户,提高交互的友好性(当然这些同义词的定义是要在配置文件中事先 ...
- solr配置同义词,停止词,和扩展词库(IK分词器为例)
定义 同义词:搜索结果里出现的同义词.如我们输入”还行”,得到的结果包括同义词”还可以”. 停止词:在搜索时不用出现在结果里的词.比如is .a .are .”的”,“得”,“我” 等,这些词会在句子 ...
- 转:solr6.0配置中文分词器IK Analyzer
solr6.0中进行中文分词器IK Analyzer的配置和solr低版本中最大不同点在于IK Analyzer中jar包的引用.一般的IK分词jar包都是不能用的,因为IK分词中传统的jar不支持s ...
- 我与solr(六)--solr6.0配置中文分词器IK Analyzer
转自:http://blog.csdn.net/linzhiqiang0316/article/details/51554217,表示感谢. 由于前面没有设置分词器,以至于查询的结果出入比较大,并且无 ...
- docker环境下solr6.0配置(中文分词+拼音)
前言:这篇文章是基于之前的“linux环境下配置solr5.3详细步骤”(http://www.cnblogs.com/zhangyuan0532/p/4826740.html)进行扩展的.本篇的步骤 ...
- Solr6.5配置中文分词IKAnalyzer和拼音分词pinyinAnalyzer (二)
之前在 Solr6.5在Centos6上的安装与配置 (一) 一文中介绍了solr6.5的安装.这篇文章主要介绍创建Solr的Core并配置中文IKAnalyzer分词和拼音检索. 一.创建Core: ...
- [大数据]-Fscrawler导入文件(txt,html,pdf,worf...)到Elasticsearch5.3.1并配置同义词过滤
fscrawler是ES的一个文件导入插件,只需要简单的配置就可以实现将本地文件系统的文件导入到ES中进行检索,同时支持丰富的文件格式(txt.pdf,html,word...)等等.下面详细介绍下f ...
随机推荐
- nginx重启失败
参考: http://www.bubuko.com/infodetail-1742262.html Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8 ...
- ZOJ1003 Crashing Balloon
Crashing Balloon Time Limit: 2 Seconds Memory Limit: 65536 KB On every June 1st, the Children's ...
- rtp/rtsp over http的学习
要做rtp/rtsp over http, 我对http也有点了解, 以前也做过rtp/rtsp over tcp/udp传输264视频流, 但刚开始还是没有一点思路,想着把http和rtp等联系到一 ...
- Github上的几个C++开源项目
Github上的几个C++开源项目 http://blog.csdn.net/fyifei0558/article/details/47001677 http://www.zhihu.com/ques ...
- 智联招聘的python岗位数据结巴分词(二)
上次获取第一次分词之后的内容了 但是数据数据量太大了 ,这时候有个模块就派上用场了collections模块的Counter类 Counter类:为hashable对象计数,是字典的子类. 然后使用m ...
- 获取mac地址和IP地址方式
第一种 public class OperateMAC{ public static string GetMacByWMI() { string MacAddr = null; //Managemen ...
- python ajax post 数据
简单的html <div> <input type="submit" id="tes" value="tes"> & ...
- selenium 多表单切换处理(iframe/frame)
在web应用中,前台网页的设计一般会用到iframe/frame表单嵌套页面的应用.简单的就是一个页面签嵌套多个HEML/JSP文件.selenium webdriver 只能在同一页面识别定位元素 ...
- AC日记——Red and Blue Balls codeforces 399b
399B - Red and Blue Balls 思路: 惊讶的发现,所有的蓝球的消除都是独立的: 对于在栈中深度为i的蓝球消除需要2^i次操作: 代码: #include <cstdio&g ...
- DB2、ORACLE SQL写法的主要区别
DB2.ORACLE SQL写法的主要区别 说实话,ORACLE把国内的程序员惯坏了,代码中的SQL充斥着大量ORACLE特性,几乎没人知道ANSI的标准SQL是什么样子,导致程序脱离了ORACL ...