为什么ElasticSearch没有找到我的任期 [英] Why ElasticSearch is not finding my term
本文介绍了为什么ElasticSearch没有找到我的任期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚安装和测试弹性搜索看起来不错,我需要知道一些我有一个配置文件
I just installed and testing elastic search it looks great and i need to know some thing i have an configuration file
elasticsearch.json
在 config
目录
{
"network" : {
"host" : "127.0.0.1"
},
"index" : {
"number_of_shards": 3,
"number_of_replicas": 1,
"refresh_interval" : "2s",
"analysis" : {
"analyzer" : {
"index_analyzer" : {
"tokenizer" : "nGram",
"filter" : ["lowercase"]
},
"search_analyzer" : {
"tokenizer" : "nGram",
"filter" : ["lowercase"]
}
},
"// you'll need lucene dep for this: filter" : {
"snowball": {
"type" : "snowball",
"language" : "English"
}
}
}
}
}
我已经插入了一个包含单词搜索
如果我搜索关键字
搜索
它说没有发现...
and i have inserted an doc that contains a word searching
if i search for keyword
search
it says nothing found...
不要在索引之前干掉,或者我错过了配置中的某些东西。
wont it stem before indexing or i missed some thing in config ....
推荐答案
?
您的配置看起来不太好。尝试:
your config does not look good. try:
...
"index_analyzer" : {
"tokenizer" : "nGram",
"filter" : ["lowercase", "snowball"]
},
"search_analyzer" : {
"tokenizer" : "nGram",
"filter" : ["lowercase", "snowball"]
}
},
"filter" : {
"snowball": {
"type" : "snowball",
"language" : "English"
}
}
这篇关于为什么ElasticSearch没有找到我的任期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文