Hi there. I am trying range filter based on a long attribute but it seems not to be working.
This is the que query I am using:
GET my_index/_search
{
"query": {
"bool": {
"must_not": [
{
"exists": {
"field": "statistics.stats_last_purchase_minus_six_months"
}
},
{
"range": {
"user_account_profile.user_account_id": {
"gte": 0,
"lt": 10000
}
}
}
]
}
}
}
This is the mapping of this attribute:
"user_account_id": {
"type": "long"
}
An this is part of a document that is being returned:
...
"user_account_id" : 5489108
...
By the way, I see that many documents returns this attribute as string even with the right mapping (as shown above).
Example:
...
"user_account_id" : "5258648"
...
Can I get some help?