Update mappings for kibana index#9280
Conversation
|
@lukasolson @LeeDr @tylersmalley this is ready for review now. |
|
@ycombinator, looks like there is a failing test: |
| const mapping = mappingSetup.expandShorthand({ | ||
| title: 'string', | ||
| timeFieldName: 'string', | ||
| title: 'keyword', |
There was a problem hiding this comment.
Are we sure we want these to be not-analyzed? We might want to use text in these cases.
There was a problem hiding this comment.
From what I could tell the title here is the index pattern, for example, logstash-*. So I'm fairly certain this ought to be not analyzed.
There was a problem hiding this comment.
I ended up changing this to text anyway. I explained the reason in f654def.
|
BTW, I'm getting this error now when I load up the index patterns page: So there's more work to be done on this PR. Removing review label for now... |
|
Strange, I don't see the error from my previous comment any more. Perhaps I was switching between branches or something. Marking this as ready for review again. |
|
So, this seems to fix the problems with opening Kibana. But as soon as I choose an index pattern and try to go to discover, I get this error: Here's the request causing the error: PUT https://localhost:5601/mkn/elasticsearch/.kibana/_mapping/search
{
"search": {
"properties": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"hits": {
"type": "integer"
},
"columns": {
"type": "string"
},
"sort": {
"type": "string"
},
"version": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "string"
}
}
}
}
}
}Here's the response: {
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "No handler for type [string] declared on field [title]"
}
],
"type": "mapper_parsing_exception",
"reason": "No handler for type [string] declared on field [title]"
},
"status": 400
} |
|
@Bargs I could you use your help with the first two files listed in #9280 (comment): The first file, The second file |
|
@BigFunger Do you know if the |
This needs to be text because other types in the Kibana index also have a field named "title", whose mapping needs to be text. We can't have the same field have different mappings in different types within the same index.
|
@ycombinator both of those files can be deleted, they're leftovers from the add data stuff. |
|
I ❤️ you @Bargs |
|
Checked with @BigFunger about #9280 (comment). That file ( |
|
Chatted with @BigFunger about the code that's being deleted in #9321. That code is currently not reachable so we don't need to wait for it to be deleted in order to make progress on this PR. @lukasolson @tylersmalley Mind giving this another looksie? |
|
Looks like it's referenced from the tests. Mocha Failure: |
lukasolson
left a comment
There was a problem hiding this comment.
Things seem to be functional and the changes LGTM.
tylersmalley
left a comment
There was a problem hiding this comment.
LGTM - also went through some smoke testing, especially around saved objects.
|
It is possible to backport this patch to Kibana 5.x ? |
Fixes #9276.
In elastic/elasticsearch#21670 backwards compatibility of mappings was removed. This included support for the
string/not_analyzedmapping; thekeywordmapping must be used instead. This PR makes this change in the mapping of the Kibana index (default:.kibana).Note that this PR fixes the easy part of the problem :) The harder problem is to automatically, at runtime, upgrade the mapping for existing (i.e. pre-6.0) users of Kibana. This upgrade issue will be dealt with in #6409.