AWS OpenSearch/Elasticsearch Match_phrase_prefix Query doen' t适用于节点
我有一个具有4个碎片和3个数据节点的AWS Elasticsearch域。
shard 3与2个节点相关:xqvlrod1rocshwwwzlwxy4g和gn9dyu4ps22ggnedecg6rrq。
第一个查询返回预期的结果:
POST carat-prod/_search?preference=_shards:3|_only_nodes:xQVLroD1RoCShwwzLwXY4g
{
"explain": true,
"query": {
"match_phrase_prefix": {
"content": {
"query": "10 Blahblahblah Avenue Apt. 42 Banana, NJ 0700"
}
}
}
}
但是第二个查询没有返回:
POST carat-prod/_search?preference=_shards:3|_only_nodes:gn9dYu4pS22gNEDeCg6RrQ
{
"explain": true,
"query": {
"match_phrase_prefix": {
"content": {
"query": "10 Blahblahblah Avenue Apt. 42 Banana, NJ 0700"
}
}
}
}
查询的唯一区别是指定的节点。
实际上,目标文档包含该行(NJ 0700
之后附加1
):
10 Blahblahblah Avenue Apt. 42 Banana, NJ 07001
如果我尝试搜索,则
10 Blahblahblah Avenue Apt. 42 Banana, NJ 07001
我的两个节点都会产生预期的结果。
有人有什么想法,为什么会这样吗?
I have an AWS ElasticSearch domain with 4 shards and 3 data nodes.
The shard 3 linked with 2 nodes: xQVLroD1RoCShwwzLwXY4g and gn9dYu4pS22gNEDeCg6RrQ.
The first query returns the expected result:
POST carat-prod/_search?preference=_shards:3|_only_nodes:xQVLroD1RoCShwwzLwXY4g
{
"explain": true,
"query": {
"match_phrase_prefix": {
"content": {
"query": "10 Blahblahblah Avenue Apt. 42 Banana, NJ 0700"
}
}
}
}
But the second one returns nothing:
POST carat-prod/_search?preference=_shards:3|_only_nodes:gn9dYu4pS22gNEDeCg6RrQ
{
"explain": true,
"query": {
"match_phrase_prefix": {
"content": {
"query": "10 Blahblahblah Avenue Apt. 42 Banana, NJ 0700"
}
}
}
}
The only difference in the queries is the specified node.
Actually, the target document contains the line (additional 1
after NJ 0700
):
10 Blahblahblah Avenue Apt. 42 Banana, NJ 07001
If I try to search for
10 Blahblahblah Avenue Apt. 42 Banana, NJ 07001
I have the expected result from the both nodes.
Does anyone have any ideas why this might be so?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请分享您的索引映射和设置,没有这些映射和设置,很难回答您的问题。
一些解决方案:
Hth
Please share your index mappings and settings, without these it is very difficult to answer your question.
Some solutions:
HTH