I want to count the number of document that
- has either or both term A and term B
- if term A or/and term B exist, the value is between a range.
I manage to write count for single term count as below and it returns correct count. However, how should I change it to include term "B" with an "OR" logic?
GET /propertyindex/_count
{
"query": {
"range": {
"A": {
"gt": 1550160000,
"lte":1551369600}
}
}
}