I am trying to run a simple query in nodeJS vs my ElasticSearch:
client.search({
index: "usage_*",
size : 100,
from: 0,
body: {
query: {
filtered:{
filter:{
bool:{
must: [{"range":{"created":{"gte":{"day":"09","month":"08","year":"2017"},"lt":"now"}}}]
}
}
}
}
}
}
and I keep getting an exception with:
[query_parsing_exception] [range] query does not support [day], with { index="usage_2017-04-01" & line=1 & col=83 } (and) [query_parsing_exception] [range] query does not support [day], with { index="usage_2017-04-02" & line=1 & col=83 } (and) [query_parsing_exception] [range] query does not support [day], with { index="usage_2017-04-03" & line=1 & col=83 } (and)
can someone point me to the problem? I understood that i can write the date as i wrote above(obviously i could write it in other syntax but i am generating this search call using a generic query builder i created)