Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道如何使用 ElasticSearch JSON API 在任何搜索结果上设置大于、小于或介于过滤器之间的过滤器来执行过滤器?
想出了如何去做。您需要使用范围值:
curl -X GET "http://0.0.0.0:9200/users/_search?pretty=true" -d '{"filter":{"range" : { "age" : { "from":20, "to": 21 } } }}'