在ES中如果更新了词库,就需要对已经存在的索引重新构建。
POST /shop/_update_by_query
{
"query": {
"bool": {
"must": [
{"term": {
"name": {
"value": "南"
}
}},
{
"term": {
"name": {
"value": "大"
}
}
}
]
}
}
}
可以查看到查果: