Solr Suggested Search en_CA

#1

I’ve been having an issue when it comes to the language of a region on the search suggest. When we Set our language to English Canadian there seem to be no results until you press enter.

I’ve Tested and we are able to switch between basic languages like French, English and the search results work for suggest. So we are under the impression that en_CA is missing from the suggest search.

I’ve tried adding the following below to configuration file.

Location: /usr/local/xwiki/data/solr/xwiki/conf/managed-schema

This still hasn’t fixed the issue. Has anyone fixed this or is this an ongoing issue with search suggest ?

0 Likes

#2

I had a similar issue that the search by default only displays results in the “current language”.
To change this I have edited the wiki page at ..../Main/SolrSearchConfig and changed:

  'locale': ["$xcontext.locale", '']

to

   'locale': ["en", "de", '']

because en and de are the locales supported in my wiki. However I guess you already did something like this as the normal search results include results from all pages.

What I might think that could work is to go to the page .../XWiki/SuggestSolrMacros, edit this in the wiki editor, and comment the following lines:

#if (!$filterNames.contains('locale'))
  #set ($discard = $filterQuery.add("locale:(""$xcontext.locale"" OR """")"))
#end

(i.e. by prefixing them with ##). Maybe this disables the “only display results in the current locale” and make the results from the en_CA language show up.

0 Likes