【发布时间】:2014-10-29 10:40:40
【问题描述】:
我们在单个节点上使用弹性搜索对数据进行了索引。我们在后台运行了一个线程,用于使用最近的更改更新索引。
现在我们使用弹性搜索 API 来运行搜索查询。
{
"from" : 0,
"size" : 20,
"timeout" : 0,
"query" : {
"filtered" : {
"query" : {
"query_string" : {
"query" : "Bug-157099*",
"default_field" : "_content",
"default_operator" : "and",
"allow_leading_wildcard" : true,
"analyze_wildcard" : true
}
},
"filter" : {
"fquery" : {
"query" : {
"query_string" : {
"query" : "pxObjClass:(\"ProjMgmt-Work-Project\")",
"default_field" : "_content",
"default_operator" : "and",
"allow_leading_wildcard" : true
}
},
"_cache" : false
}
}
}
},
"fields" : "*"
}
但是,搜索查询返回的结果不一致。在连续重新运行查询时,有时我们得到 0 个结果,有时是部分结果,有时我们得到完整的结果。
我们在只有一个节点是索引节点的集群中面临这个问题。
您能否告诉我们可能导致此问题的原因?
【问题讨论】:
-
您能否提供更多信息:例如你用什么查询?
-
这是一个过滤查询。
标签: search elasticsearch