# # term 查询与match_phrase区别
# term >range>exists>prefix>wildcard
#严格keyword匹配,filter可以利用缓存,忽略TF—IDF计算
POST kibana_sample_data_ecommerce/_search
{
"size": 20,
"query": {
"constant_score": {
"filter": {
"term": {
"products.product_name.keyword": "Basic T-shirt - dark blue/white"
}
}
}
}
}
POST kibana_sample_data_ecommerce/_search
{
"size": 20,
"query": {
"match_phrase": {
"products.product_name": {
"query": "Basic white",
"slop":4
}
}
}
}
# term >range>exists>prefix>wildcard
#严格keyword匹配,filter可以利用缓存,忽略TF—IDF计算
POST kibana_sample_data_ecommerce/_search
{
"size": 20,
"query": {
"constant_score": {
"filter": {
"term": {
"products.product_name.keyword": "Basic T-shirt - dark blue/white"
}
}
}
}
}
POST kibana_sample_data_ecommerce/_search
{
"size": 20,
"query": {
"match_phrase": {
"products.product_name": {
"query": "Basic white",
"slop":4
}
}
}
}
网友评论