GET /idx_hippo_sku_statistics_index/sku_statistics_index/_search { "from" : 0, "size" : 100, "query" : { "bool" : { "must":[ { "range" : { "salePrice" : { "from" : 1.9, "to" : 2.1, "include_lower": true, "include_upper": true } } } , { "bool": { "must": { "terms": { "cityId": [136] } } } } ] } }, "sort": [ { "salePrice": "asc" } ], "_source": ["productName","salePrice"] }
"range" : { "salePrice" : { "from" : 1.9, "to" : 2.1, "include_lower": true, "include_upper": true } }
表示范围查询,查询 1.9 <= salePrice <= 2.1 的
include_lower 为 ture >= false >
include_upper 为 ture <= false <
terms 表示单个查询;