Ivinsky
Ivinsky

Reputation: 21

Sitecore 8 Arabic search

Anyone used the Sitecore 8 Lucene for Arabic language? We are using the default settings and the following code to get search results but we have an issue with Arabic words. It looks like search index contains just English words and doesn't contain Arabic words

var indexName = "sitecore_master_index";            
var index = ContentSearchManager.GetIndex(indexName);
var sitecoreService = new SitecoreService(databaseName);
using (var context = index.CreateSearchContext())
{
  var templates = templateFilter.Split('|');
  var homeId = new ID(Settings.HomeID);

  var results = context.GetQueryable<MySearchItem>(new CultureExecutionContext(CultureInfo.GetCultureInfo(Sitecore.Context.Language.Name)))
                    .Where(item => templates.Contains(item.TemplateName)
                        && item.Content.Contains(fullTextQuery)
                        && item.Language == Sitecore.Context.Language.Name
                        && item.Paths.Contains(homeId)
                        )
                    .Take(SearchResultPerPage)
                    .ToList();

Any ideas? What should we change?

Upvotes: 0

Views: 203

Answers (1)

Ivinsky
Ivinsky

Reputation: 21

We created the custom index (https://himadritechblog.wordpress.com/2014/05/30/sitecore-custom-index-with-selected-fields/) and specified fields ids which we would like to add to index to solve the issue.

Upvotes: 1

Related Questions