我正在获取自动完成弹性搜索中的所有字段。我想要那些只有相关值的字段。这样可行吗?
我试过了:
{
"query": {
"bool": {
"should": [
{
"multi_match": {
"query": "B",
"fields": [
"City",
"MLSNumber"
],
"zero_terms_query": "all",
"boost": 3
}
},
{
"multi_match": {
"query": "B",
"fields": [
"City",
"MLSNumber"
],
"zero_terms_query": "all",
"fuzziness": 0,
"boost": 1
}
}
],
"minimum_should_match": 1
}
},
"sort": [
{
"_score": "desc"
}
],
"from": 0,
"size": 25
}