Here is the mapping. I have a property named @timestamp.
{
"my_index" : {
"mappings" : {
"properties" : {
"@timestamp" : {
"type" : "date_nanos"
}
}
}
}
}
But when I query like this:
{
"sort" : {
"@timestamp" : "desc"
}
}
I got an error: No mapping found for [@timestamp] in order to sort on.
I found some solution using unmapping_type, but I have definition in the property. Could someone help explain this case? I just started to use elasticsearch. Thanks.
You need to query on your specific index
And not
Because otherwise you'll hit all indexes in your cluster and the odds are high that one of them doesn't have a
@timestampfield.