Epinova / Epinova.Elasticsearch

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

Querying custom type in secondary index fails due to DidYouMean being enabled #144

Closed jonatanjii closed 2 years ago

jonatanjii commented 2 years ago

DidYouMean is enabled by default, and there seems to be no way to disable it, when using GetCustomResults(). This causes "no mapping found for field [DidYouMean]" error when querying custom types in a secondary index.

In the async version GetCustomResultsAsync() DidYouMean is disabled: query.EnableDidYouMean = false;

All queries using GetCustomResults() fails but the same queries using the async version works.

otanum commented 2 years ago

Any chance @jonatanjii could verify 11.7.4.234-pre? Both sync and async version.

jonatanjii commented 2 years ago

Can´t test it but it looks ok. The only change that was required was to disable DidYouMean by default in GetCustomResults() which was already the case in the async version of the same method.