Bool query with range


(Riccardo Di Nuzzo) #1

Hi

Given that in my index there is a document with "LogType": "Terapy" and "LogDate": { "gte": "2015-01-01"}

why the following bool query doesn't return any document?

{
"query": {
"bool" : {
"must" : {
"term" : { "LogType" : "Terapy" }
},
"should": {
"range" : {
"LogDate" : { "gte" : "2015-01-01" }
}
}
}
}
}

Thanks


(David Pilato) #2

Please format your code using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

Please edit your post.

Try with terapy instead.


(system) #3

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