Closed danbev closed 8 years ago
Can one of the admins verify this patch?
Can one of the admins verify this patch?
Can one of the admins verify this patch?
@ewolinetz Are you able to validate this is an acceptable modification? @danbev I do not recall if there are unit tests associated with this logic.
@jcantrill I had a look but was unable to find any in the project itself.
Closing this PR as it was addressed as part of #22
Motivation: When trying to save a search in Kibana the following error is displayed:
Discover: Request to Elasticsearch failed: "MapperParsingException[object mapping for [search] tried to parse field [title] as object, but got EOF, has a concrete value been provided to it?]"
The .kibana index has a type named 'search' which it uses to store searches made in the Discover view of the Kibana Web Console.
When createSearchProperties is called it inserts a document into .kibana/search with an id of 'properties'. This data is then inspected by ElasticSearch and it will dynamically create a mapping for those fields.
Looking at the contents of the sent data it looks more like type mapping which one might expect to see in .kibana/_mappings/search, and it does not look like format of a search saved by Kibana. The field names are the same in this case but instead of expecting the 'title' field to be of type string, it is expecting it to be of type object as that is what the mapping was updated to.
Modifications: Removed the createSearchProperties call from the code.
Result: After this it is possible to save searches in the Kibana console.
Issue: https://github.com/fabric8io/openshift-elasticsearch-plugin/issues/20