Filtering languages using the .Net Web Service
Trying to set the preferred language to "ar-SA", and "Arabic", as well as the current Sitecore context language, but nothing seems to be working.
Here is a snippet
QueryParameters queryParams = new QueryParameters(); queryParams.CollectionNames = searchCollections; queryParams.BasicQuery = query; queryParams.PreferredLanguage = "ar-SA"; // Sitecore.Context.Language.Name;
StringBuilder advancedQuery = new StringBuilder();
QueryResults coveoResults = service.PerformQuery(queryParams);
I believe the core here is the queryParams.PreferredLanguage but I might be using the wrong field.
I don't think that the
PreferredLanguage is the way to go to filter results based on a language. Do you have a field containing the language of your Sitecore items? If not, I suggest you add one through the mapping file. Then, just add an advanced query expression with
There has to be an out of the box way of doing this. When I use the .Net Front-End/Default Search Interface page, I am able to set the language to Arabic and only the Arabic pages are returned. How is it filtering out the non Arabic pages?