Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.

 

what is the language parameter that needs to be passed to UnifiedSearch(query,language)

Vote:
 

Hi,

I'm trying to use UnifiedSearch as :

SearchClient.Instance.UnifiedSearchFor(searchQuery).GetResult().

But When I'm writing the code it is asking me to pass language parameter to UnifiedSearchFor method as :

UnifiedSearchFor(string query, Language language).

Not sure what is the language parameter I need to pass.

Any Ideas please.

Thanks.

#74506
Aug 30, 2013 7:47
Vote:
 

Language is a class that has a number of static properties that you can use to provide a specific language for the query.

SearchClient.Instance.UnifiedSearchFor(searchQuery, Language.English).GetResult().
 
#74514
Aug 30, 2013 9:48
Vote:
 

... and if you want to load the current language.

SearchClient.Instance.UnifiedSearchFor(searchQuery, Language.GetSupportedLanguage(ContentLanguage.PreferredCulture)).GetResult().

    

#74528
Aug 30, 2013 12:27
Vote:
 

Hi Marcus

I'm able to pass the language parameter now.

Thanks.

 

#74531
Aug 30, 2013 13:07
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.