我尝试发送此查询:
{
"query": {
"function_score": {
"query": {
"bool": {
"must": {
"query_string": {
"query": "oracle AND san AND francisco AND hadoop",
"fuzzy_transpositions": false,
"auto_generate_synonyms_phrase_query": false
}
},
"disable_coord": false,
"adjust_pure_negative": false,
"boost": 1.1
}
}
}
}
}
获得总结果: 10209
如果我添加查询“ default_operator”参数:
{
"query": {
"function_score": {
"query": {
"bool": {
"must": {
"query_string": {
"query": "oracle san francisco hadoop",
"default_operator": "AND",
"fuzzy_transpositions": false,
"auto_generate_synonyms_phrase_query": false
}
},
"disable_coord": false,
"adjust_pure_negative": false,
"boost": 1.1
}
}
}
}
}
获得总结果: 431。
也许有人知道有什么不同吗?
弹性搜索版本6.4。