Epinova / Epinova.Elasticsearch

A search-plugin for Episerver CMS and Commerce
MIT License
29 stars 20 forks source link

Mapping conflict with existing mapper #142

Closed KolbeinFoldoy closed 2 years ago

KolbeinFoldoy commented 2 years ago

Epinova Elasticsearch version: 11.7.3.147 Episerver version: 11.20.2 ElasticSearch version: 7.11.1

I'm getting an error when using the button "Create or update indices with mapping".

NavinettIndexCreation

If I push the button without having an index, I receive this error: ErrorWhenCreatingWithMappingButton_LI However, an index is created afterwards.

If i push the button after having created an index, I receive this error: ErrorWhenUpdatingWithMappingButtonWithExistingIndex_LI

Using the blue button (Create or update index) will successfully create an index, but without updating the mapping. I recently added [Stem] on a string propperty which isn't updated in the mapping due to this error.

otanum commented 2 years ago

Try to drop and recreate the indices. Not possible to change analyzer of existing parameter (https://discuss.elastic.co/t/change-analyzer-of-specific-property/99012).

You could also take a look at the mapping validator. It will probably tell you the same as the exception.

KolbeinFoldoy commented 2 years ago

The problem is that I get this error every time I delete and create a new index with the green button.

otanum commented 2 years ago

Have you tried to use the mapping validator? Properties with same name must have same settings. For example if you have added stemming to one Description property and not all Description properties.