Note that there are some explanatory texts on larger screens.

plurals
  1. POsolr / lucene query highlighting in arabic
    primarykey
    data
    text
    <p>I'm working with Solr 4.1 and I want to highlight an arabic query. but it doesn't work correctly. It finds the word to be highlighted correctly but when it want to add the highlight tag (for example <em></em>) it cant find the write index to add these tag to. for example it create something like this for query pizza.</p> <pre><code>&lt;str&gt;i eat&lt;em&gt; pizz&lt;/em&gt;a every weekend&lt;/str&gt; </code></pre> <p>it works for English correctly but i just want to explain what i mean.</p> <p>or here is an arabic example for query علی:</p> <pre><code>&lt;str&gt;أَخْبَرَنِي الرَّئِیسُ الْعَفِیفُ أَبُو الْبَقَاءِ هِبَةُ اللَّه‌ِ بْنُ نَمَا بْن&lt;em&gt;ِ عَلِي&lt;/em&gt;ِّ بْ&lt;/str&gt; </code></pre> <p>which i expect to be:</p> <pre><code>&lt;str&gt;أَخْبَرَنِي الرَّئِیسُ الْعَفِیفُ أَبُو الْبَقَاءِ هِبَةُ اللَّه‌ِ بْنُ نَمَا بْنِ &lt;em&gt;عَلِيِّ&lt;/em&gt; بْ&lt;/str&gt; </code></pre> <p>note that I use the following field description:</p> <pre><code>&lt;fieldType name="text_ar" class="solr.TextField" positionIncrementGap="100"&gt; &lt;analyzer&gt; &lt;charFilter class="searchEng.solr.ar.CharFilter" /&gt; &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt; &lt;!-- for any non-arabic --&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ar.txt" enablePositionIncrements="true"/&gt; &lt;!-- normalizes ﻯ to ﻱ, etc --&gt; &lt;filter class="solr.ArabicNormalizationFilterFactory"/&gt; &lt;filter class="solr.ArabicStemFilterFactory"/&gt; &lt;/analyzer&gt; &lt;/fieldType&gt; </code></pre> <p>the first charFilter just normalize some Arabic characters.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload