// 索引结构信息
{
"game_meta_info": {
"mappings": {
"properties": {
"gameName": {
"type": "text"
}
}
}
}
}
// 查询1
{
"query": {
"term": {
"gameName": {
"value": "fps",
"boost": 1
}
}
}
}
// 查询2
{
"query": {
"constant_score": {
"filter": {
"term": {
"gameName": {
"value": "fps",
"boost": 1
}
}
},
"boost": 1
}
}
}
// 查询3
{
"query": {
"bool": {
"filter": [
{
"term": {
"gameName": {
"value": "fps",
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}
}
以上三种查询对于底层解析、执行有什么区别。性能方面有什么区别。迷惑点”query“、”filter“、”_score“。
Elasticsearch