The get_field_mapping result is okay, that's what mine looks like too (nested like that).
I wasn't able to repro the error you are seeing in Kibana, but I was able to get my index in a weird state like you have. I can do this by creating an index test-index-1
with a mapping like you are seeing:
PUT test-index-1/_mapping/type
{
"properties": {
"RequestURI": {
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
},
"type": "text"
}
}
}
Then I create another index with a mapping where RequestURI
is aggregatable:
PUT test-index-2/_mapping/type
{
"properties": {
"RequestURI": {
"ignore_above": 256,
"type": "keyword"
}
}
}
Now if I query GET /_field_stats?fields=RequestURI
I get aggregatable: true
even though it's only true for a subset of indexes.
Trying to create a visualization on this field throws an error (albeit not the error you were seeing, but my test index wasn't time based... maybe that affected it).
So my guess is your mapping changed at some point, for specific indexes. When you query the mapping, what happens if you change the specific index to just certain-applog-*
? Do you see more than one result?
When I query GET test-*/_mapping/field/RequestURI
the result is:
"test-index-1": {
"mappings": {
"type": {
"RequestURI": {
"full_name": "RequestURI",
"mapping": {
"RequestURI": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
},
"test-index-2": {
"mappings": {
"type": {
"RequestURI": {
"full_name": "RequestURI",
"mapping": {
"RequestURI": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
One for each index.
What is your index pattern in kibana? If you set it explicitly to 'certain-applog-2017.02.27'
do you then see the RequestURI.Keyword
field?
Where are you getting your data from? Perhaps your configuration files changed at a certain point so that all indexes after time X are using a new mapping configuration?