Mohammed Mohammed

Sitecore 7 Arabic search, spell check And suggestions

Recently I was asked to create a proof of concepts for sitecore Arabic search with spell checking and suggestion accordingly while searching and investigating I had a good results and to let our TANASUK value "Sharer's" comes true I am sharing these results.



Let's start with the good news that's sitecore 7 support Arabic search and it is as simple as searching for English words, as you can see in the next code snippet you just use the lucene index to search for your Arabic phrase:




Now let's go to spell checking and suggestions using lucene.Net library and let's suppose that we need these suggestions to be from our sitecore site items contents;

The first step to do is to create a new index for the items that will be used as a source for our operations; as an example below we just indexed the [Title] field of our items:





The next thing to do is preparing the lucene spell checker dictionary by setting its source to the previously created index above:





Now we can get our word similar suggestion using the spell checker of the Lucene.Net Lib as simple as the following code:



finally to complete our code sample here; the following will present the caller code:




As we can see using the simple few steps above using sitecore 7 and Lucene.Net we can search for Arabic phrases, we can spell check words and make suggestions for wrong words


Tags: Sitecore 7 search,Spell Check,Lucene search,Suggestions,Create Index

happening now...

  • RT @HolaIAmLola: CONGRATS HADEEL!!!! It was so great meeting you and the rest of the @TanasukTech squad this weekend! đź’›…

  • RT @tamer_mehyar: @TanasukTech citizens having delicious Sunday lunch @WingsAndRings #menofsitecore : @AhmedAburabi @ahmad91omari @RizAyoub…

  • RT @jaffal: My First Sitecore Symposium #SitecoreSYM #Sitecore @TanasukTech

  • RT @SitecoreChris: @Miea_jazairi @TanasukTech That is awesome. It always feels good to see the number of @sitecore certified go up. Means…

view more Tweets

Popular Keywords