We have a large site with a number of language versions, and an onsite Find server.
When upgrading to Find 9.6 we started to notice that we no longer got a search result when the current language was English.
Default language for our site is en-GB. en-IE and en-US is also enabled, but the language "en" is not.
We use unified search in the simplest form:
I notice from Fiddler that when the search is sendt to EpiFind server, a number of criteria on "PublishedInLanguage.en" is set.
Problem is that there are no "en" language in the index.
I've experimented with the "QueryEPiServer Find" page on the Elasticsearch admin.
This query yields no hits:
By manually adding -GB to the languagecode like this:
the server returns "a lot of hits"
As far as I can see, the "language" parameter on UnifiedSearchFor does not differensiate between the "flavours" of "en".
Question: How can I tell unified search that languagecode en-GB should be used and not just en?
Thanks in advance!
Have you tried to reindex using the scheduled job? There was an earlier bug with Find when automatically updating index when publishing pages. Might be worth trying as work-around...
Thanks for reply.
I've triggered a manual re-index - but the behaviour is still the same.
We usually change the default filters in an initializable module, that seems to fix these kind of issues:
.PublicSearchFilter(client => client.BuildFilter<PageData>()
Notice the overload in FilterForVisitor where we pass in the current content language.
It seems like Find is not falling back on correct non-specific culture and vice versa.
Thanks again for replies.
I have solved this with a quickfix by using
..if search is executed while in one of the english language modes (en-GB, en-US) and added a langugage filter on the search result.
For all other languages, I use UnifiedSearchFor without any language spesification, and it works as expected.
I will explore your suggestion when I have the time.