我对弹性搜索非常陌生,并且我正在使用高级休止符从ES中获取结果。正在形成的查询是:
{
"from": 0,
"size": 10,
"query": {
"query_string": {
"query": "(a^10 OR a*^5)",
"fields": [
"SearchName^1.0",
"SearchName.folded^1.0"
],
"type": "best_fields",
"default_operator": "or",
"max_determinized_states": 10000,
"enable_position_increments": true,
"fuzziness": "AUTO",
"fuzzy_prefix_length": 0,
"fuzzy_max_expansions": 50,
"phrase_slop": 0,
"escape": false,
"auto_generate_synonyms_phrase_query": true,
"fuzzy_transpositions": true,
"boost": 1
}
},
"post_filter": {
"bool": {
"should": [
{
"term": {
"Source": {
"value": "TALENT2",
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"sort": [
{
"LastModifiedTs": {
"order": "desc"
}
}
]
}
如果我删除了后置过滤器条件,但使用后置过滤器没有任何结果,则以上查询工作正常。
任何帮助都是完整的帮助。