Closed hakonn closed 2 years ago
I notice that some unit tests aren't too happy with my pull request. So, to be a bit bold, I'll say that the unit tests are wrong. Because:
If you setup a new episerver site, add for instance en-gb as a language, add epinova elastic plugin, press the "Create or update indices" button in the Search dashboard (/ElasticSearchAdmin/ElasticAdmin), the index for en-gb will we be created and named "index-name-en-gb".
Then if you use the ElasticSearchService to query some result in that language, en-gb, you will not hit that index. Because the current Language.GetLanguageCode method will return "en" instead of "en-gb", and ElasticSearchService will then try to open an index with the following name "index-name-en" which is wrong because the index name is "index-name-en-gb".
Or have I misunderstood something(?).
Will this PR be merged anytime soon, @otanum ? Can't currently use Epinova Elasticsearch with Episerver sites with both nb-NO and nn-NO. Found any workaround, @hakonn ?
I will take a look at it @KolbeinFoldoy. I do not have any time for ElasticSearch this week.
@otanum any news 1 year later? Is this project still supported?
I am in the process of adding support for non neutral cultures. This pull request will not be merged as it adds more Episerver dependencies in the Core project.
I have added ISearchLanguage interface with default implementation in the Core project. Another implementation is added to the Episerver project.
Get search result from ElasticSearchService if the site is using languages with location, like nb-no and nn-no.