更新时间:2022-05-28 23:50:08
When looking for exact match against a field use term query on keyword
field.
查询:
{
"query": {
"term": {
"fit.keyword": "slim"
}
}
}
更新:通过 query_string
UPDATE: Via query_string
要使用 query_string
进行精确匹配,请包装字符串
For exact match using query_string
wrap the string to be matched in quotes.
{
"query": {
"query_string": {
"query": "fit.keyword:\"extra slim\""
}
}
}