ElasticSearch DSL查询语句

忘是亡心i 2022-05-12 11:18 364阅读 0赞

1 match_all 匹配所有查询

  1. {
  2. "query": { "match_all": {} } }

2 match 匹配 分词

  1. {
  2. "query": { "match": { "ip_category": 6 } } }

3 multi_match多值匹配

  1. {
  2. "query": { "multi_match": { "query": "值", "fields": [ "name", "age" ] } } }

4 term 精确匹配 不分词

  1. {
  2. "query": { "term": { "ip": "值" } } }

5 range 范围查询

  1. {
  2. "query": { "range": { "age": { "gte": 1, "lte": 6 } } } }

发表评论

表情:
评论列表 (有 0 条评论,364人围观)

还没有评论,来说两句吧...

相关阅读