I don't think it will work with integers. Does it make sense?
With numbers, you probably want to do range queries and not wildcard.
If you really need wildcard, that means that you consider your field as a String
and so, you have to send it like: "id" : "126"
For query string syntax, I suggest that you give a look at:
For example, I suppose that you can run something like:
ManufacturingDate:[20101024 TO 20121224]
But, I recommand to use the QueryDSL:
Does it help?
Le 5 décembre 2012 à 14:20, Jens Christian Groh email@example.com a écrit :
I have some problemes to build integer and wildcards.
http : //localhost:9200/index/type/_search?q=Id:1*
If this is my query and my object looks like this:
Id : 126
It should return the object with the Id: 126 or not?
The Second problem I have is to build a query with a date range. Date are
formated as strings.
My Object looks like this:
ManufacturingDate : "2012/10/24 18:18:09"
I thought query should look like this:
Does anyone have some hints or suggestions for me?
Thanks in advance.
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs