Elasticsearch filter with range


(Netai Biswas) #1

Hi,

I am new to elastic search and evaluating it for one of the project. Currently I am using a windows system and using web browser retrieving data. I have multiple fields, one of them is “day”. So while filtering out I wanted to put a range instead of a particular value, can you please help me out doing that?

http://localhost:9200/test/_search?pretty&q=day:27

Thanks,
NB


(David Pilato) #2

I'd provide a body as it's more flexible and I'd use then a range query. https://www.elastic.co/guide/en/elasticsearch/reference/5.4/query-dsl-range-query.html

Or you can do it with day:[x TO y]


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.