I managed to build query that
- matches all exact values in given time range
- supports
and
operator.
Now I want to extend the query to support partial matching but I struggle to do that. Any advice would be appreciated.
Mapping
"event": {
"properties": {
"alarmId": {
"type": "string",
"index": "not_analyzed"
},
"startTimestamp": {
"type": "long"
},
...
}
}
Current query
{
"bool": {
"must":[
{"range": {"endTimestamp": {"gte": ?0}}},
{"range": {"startTimestamp": {"lte": ?1}}}
],
"should": [
{"match": {"_all": {"query": "?2", "zero_terms_query": "all", "operator": "and"}}}
],
"minimum_should_match" : 1
}
}