I've got a document with a long integer identifier:
"id": -6001495857799773000
Trying to filter based on this identifier returns nothing:
"query": {
"filtered": {
"filter": {
"term": {"id": -6001495857799773000}
I switched to a range query and expanded the range to 1000 numbers on each
side. I hit the document I expected. Through narrowing the range, I found a
number that the term query will exactly match against the document:
"query": {
"filtered": {
"filter": {
"term": {"metric.batchId": -6001495857799773137}
You can see this number is 137 less than the actual number returned in the
document. This number works for both range (with lte and gte both set to
this number) and term queries. What is going on here?
"id": -6001495857799773000
Trying to filter based on this identifier returns nothing:
"query": {
"filtered": {
"filter": {
"term": {"id": -6001495857799773000}
I switched to a range query and expanded the range to 1000 numbers on each
side. I hit the document I expected. Through narrowing the range, I found a
number that the term query will exactly match against the document:
"query": {
"filtered": {
"filter": {
"term": {"metric.batchId": -6001495857799773137}
You can see this number is 137 less than the actual number returned in the
document. This number works for both range (with lte and gte both set to
this number) and term queries. What is going on here?