Epinova / Epinova.Elasticsearch

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

Custom types not working on Elasticsearch 6+ #84

Open paalm opened 5 years ago

paalm commented 5 years ago

So I am trying to add custom types. After fixing the documentation I was able to run it. But it doesnt input any documents into the index. And I tried to update mapping, but then I got error saying that I its not possible to have more than one type. And off course, that is a breaking change in Elasticsearch 6. There are only one type now.

So custom types is wrong in it selves if you run Elasticsearch 6+. I suggest we change it to or add a "Custom Fields" method. A method that just add custom fields to the "main type" and do bulk operations to the new fields.

apeneve commented 5 years ago

I would suggest creating one index per custom type to index.

paalm commented 5 years ago

Yes, I agree. I have tried this, but it does not search in both indexes if I try with wildcard on index name. I would like to use the alias, but I guess its not yet in place. How can I search in multiple indexes?