【发布时间】:2020-04-14 11:25:55
【问题描述】:
{
"from": 0,
"size": 100,
"timeout": "10m",
"query": {
"bool": {
"must": [
{
"bool": {
"must": [
{
"bool": {
"filter": [
{
"bool": {
"must": [
{
"term": {
"input.custom_attrs.index": {
"value": "1",
"boost": 1
}
}
}
]
}
},
{
"bool": {
"must": [
{
"prefix": {
"input.custom_attrs.value": {
"value": "An*",
"boost": 1
}
}
}
]
}
}
]
}
}
]
}
}
]
}
}
}
说明—— 我想搜索以“An”为前缀的字段。 此外,我确信存在价值为“Annual”和“Annual Fund”的数据,它们应该出现在所有匹配搜索中。 但是这些记录没有出现上面给出的前缀查询。我也尝试了正则表达式查询和通配符查询。但它们也不起作用。请就如何使查询工作提出宝贵的建议。
【问题讨论】:
标签: elasticsearch elasticsearch-query