我刚打酱油去了,不好意思

es routing查询问题

Elasticsearch | 作者 Felix | 发布于2015年12月31日 | 阅读数:9312

我有两个几乎一摸一样的索引

5.png

 
sell索引的mapping结构

1.png

 
sellinfo索引的mapping结构

2.png

 
同样条件查询时间对比

3.png


4.png

 
 
怎么会带routing的还慢呢,求大神解答。
补充一句:es是1.52版本的
 
 
已邀请:

medcl - 今晚打老虎。

赞同来自:

你的routing path是"_routing",你索引的json有这个字段吧?

Felix

赞同来自:

QQ截图20160104090759.png

这个单个文档的字段信息,感谢medcl大大的回答

Felix

赞同来自:

这里是查询结果
2.png


3.png

 
这里是查询语句,两个查询语句都一样

{
"size": 250,
"from": 0,
"_source": [
"corpLevel",
"corpId"
],
"sort": {
"sort": "desc"
},
"query": {
"filtered": {
"query": {
"terms": {
"keywords": [
"阀门"
]
}
},
"filter": {
"query": {
"bool": {
"must": [
{
"bool": {
"should": [
{
"prefix": {
"cate": {
"value": "126"
}
}
},
{
"prefix": {
"cate": {
"value": "125"
}
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"term": {
"attrLists": {
"value": "1029100064"
}
}
}
]
}
},
{
"bool": {
"should": [
{
"term": {
"attrLists": {
"value": "1041590072"
}
}
}
]
}
}
]
}
}
]
}
}
}
}
}
}

 

yyppdd

赞同来自:

我测试也是这样的,不知道你找到问题了没有

要回复问题请先登录注册