只提供一个输入框,查询相关的多个字段,使用DisjunctionMaxQuery --- 最佳字段查询,tie_breaker参数调整
POST kibana_sample_data_flights-1227/_search
{
"query": {
"dis_max": {
"tie_breaker": 0.7,
"boost": 1.2,
"queries": [
{
"match": {
"Origin": "Cape Sydney"
}
},
{
"match": {
"Dest": "Cape Sydney"
}
}
]
}
}
}