-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>enhancementTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchgood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme
Description
Attempting to migrate to 2.x, I've encountered a strange problem with range filters not able to match any of the mappings I try holding epoch_millis. Maybe related to #10971
Given a document with a time_stamp field in the mapping:
"time_stamp": {
"type": "date",
"format": "epoch_millis"
}
With some data:
station: "ASN00033312",
precip_tenths_mm: 2,
time_stamp: 1390712400000,
location: {
lat: -23.2233,
lon: 150.605
}
I would expect the following to match:
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"range": {
"time_stamp": {
"gte": 1390712400000,
"format" : "epoch_millis"
}
}
}
]
}
}
}
}
The above returns no document, even though there are thousands that should respond. Removing the format at query time, doesn't help. Mapping the time_stamp field as format "basic_date", as I had in 1.x, doesn't seem to return anything either.
Bug? Pebcak?
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>enhancementTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchgood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme