-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date Math does not work in filtered query #2819
Comments
That might be a duplicate of #2808 |
I could not reproduce this immediately on master or 0.90 or 0.20.6. @garcimouche can you give us some more information, what you did, which data was inserted, how your mapping looks like? |
sure data: [
{
"branch": "50",
"port": 123,
"user": "MY_USER",
"shipper_id": 1234567,
"client_id": 90020690,
"shipper_name": "MY SHIPPER NAME",
"client_name": "MY CLIENT NAME",
"tags":["tag1","tag2"],
"screened": 20130325110225,
"shipment-value":503.22
},
{
"branch": "99",
"port": 351,
"user": "ANOTHER USER",
"shipper_id": 1234568,
"client_id": 90020691,
"shipper_name": "WALMART",
"client_name": "TARGET",
"tags":["tag2","tag3"],
"screened": 20130325110225,
"billed": 20130325130527,
"shipment-value":1503.22,
"billing-revenue-fees":27.00
}
] mapping {
"settings" : {
"index.query.default_field" : "client-name",
},
"mappings": {
"entry": {
"_ttl" : { "enabled" : "true", "default" : "93d" },
"_all" : {"enabled" : "false"},
"properties": {
"branch": {"type":"string", "index" : "not_analyzed"},
"port": {"type":"integer"},
"user": {"type":"string", "index" : "not_analyzed"},
"shipper-id": {"type":"integer"},
"client-id": {"type":"integer"},
"shipper-name": {"type":"string", "analyzer": "standard"},
"client-name": {"type":"string", "analyzer": "standard"},
"tags": {"type" : "string", "index" : "not_analyzed"},
"screened": {"type" : "date", "format" : "yyyyMMddhhmmss"},
"billed": {"type" : "date", "format" : "yyyyMMddhhmmss"},
"shipment-value": {"type" : "float"},
"billing-revenue-fees": {"type" : "float"}
}
}
}
} queries snapshot mentioned in 1st post. Thank you! |
@garcimouche I had a look at your example data, and actually none of the range queries would actually work with those documents. The reason is that you did map the To solve this you need to submit the field as a string with the specified format (just add double quotes around it). Otherwise if you want to submit it as number, the long must be a time from epoch. Adding the double quotes both queries work with 0.90.5, also after #2808 was fixed. |
Closing, seems like there was an issue with the submitted documents as said above. |
newbie to ES.
This does not return any docs:
This does:
The text was updated successfully, but these errors were encountered: