查询年龄在20-25之间的,包括20岁,但不包括25岁的

GET /person_index/_search
{
  "query"{
    "range":{
      "age":{
        "from":20,
        "to":25,
        "include_lower":true,
        "include_upper":false
      }
    }
  }
}
include_lower  是否包含范围的最小值
include_upper  是否包含范围的最大值

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2021-07-25
  • 2021-06-10
  • 2021-08-02
  • 2021-11-25
相关资源
相似解决方案