Try our conversational search powered by Generative AI!

UnifiedSearch and Languages



I have a problem getting swedish results with UnifiedSearchFor(query)

ITypeSearch contentquery = SearchClient.Instance.UnifiedSearchFor(query).Take(999);
UnifiedSearchResults test = contentquery.GetResult();

If I use Search the swedish results show up. Is there some built in Filter in UnifiedSearch like FilterForVisitor() ?

Jun 26, 2015 13:16

Okay so if I have swedish language enabled and search I get only swedish results. :-/ 

Maybe it's not possible to do a UnifiedSearch over all the languages?

Jun 26, 2015 13:31

By default UnifiedSearch will query the language branch associated with the current user and apply .FilterForVisitor(language) (and also .FilterOnCurrentSite(), .ExcludeContainerPages() ad .ExcludeContentFolders()). If you want to override the language set by default form the user context you can use:


or if you want to query all language branches you can use:



Jun 26, 2015 14:27

Thank you, I tried it but it did not change anything unfortunately. Still same result. 

I browse the swedish part of site and search gives me swedish results and browsing and searching on the english part of site gives me english hits. 

Same search, different active languages.

Jun 26, 2015 15:02

Sorry, You were right ofcourse. Stupid me missed a Filter set in initialization. FilterForVisitor() :-/

Jun 29, 2015 10:20
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.