Arabic field using apache solr:
- Apache Solr has an Arabic analysis.
- If you open the default schema.xml file which comes with Solr, you will see an example of Arabic fieldtype.
- You can use CopyField to copy your fields to the Arabic field type.
- You have to reindex your content again to get the preferred results.
- If each document consists of 3 fields, two fields are integers then the third field is Arabic text with diacritics, the user may use words with or without diacritics or else some letters have diacritics and others without diacritics, you can use schema.xml which helps in such situation.
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="quran" version="1.5">
<fields>
<field name="_version_" type="long" indexed="true" stored="true"/>
<field name="_id" type="long" indexed="true" stored="true" />
<field name="sura_number" type="int" indexed="true" stored="true" />
<field name="verse_number" type="int" indexed="true" stored="true" />
<field name="verse_text" type="text_ar" indexed="true" stored="true"/>
</fields>
<types>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" />
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>
<!-- Arabic -->
<fieldType name="text_ar" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<!-- normalizes ﻯ to ﻱ, etc -->
<filter class="solr.ArabicNormalizationFilterFactory"/>
<filter class="solr.ArabicStemFilterFactory"/>
</analyzer>
</fieldType>
</types>
</schema>
Categorized in:
Tagged in:
Accenture interview questions and answers, Apache Solr, apache solr documentation, apache solr download, apache solr for indexing data, apache solr indexing, apache solr tutorial, apache solr vs elasticsearch, Applied Materials interview questions and answers, Capgemini interview questions and answers, CASTING NETWORKS INDIA PVT LIMITED interview questions and answers, CGI Group Inc interview questions and answers, Chetu interview questions and answers, Ciena Corporation interview questions and answers, Collabera Technologies interview questions and answers, Dell International Services India Pvt Ltd interview questions and answers, Flipkart interview questions and answers, IBM interview questions and answers, Indecomm Global Services interview questions and answers, Indiabulls Technology Solutions Ltd interview questions and answers, Infosys Technologies interview questions and answers, lucene index, lucene indexwriter, lucene search index, Mavenir interview questions and answers, Mphasis interview questions and answers, Nagarro Software Pvt. Ltd interview questions and answers, NetApp interview questions and answers, Opentext Technologies interview questions and answers, Oracle Corporation interview questions and answers, Persistent Systems interview questions and answers, RBS India Development Centre Pvt Ltd interview questions and answers, SAP Labs India Pvt Ltd interview questions and answers, solr architecture, solr create index, solr englishminimalstemfilterfactory, solr example, solr indexing, solr indexing example, solr indexing tutorial, solr language support, solr multi language support, solr protected words, solr search index, solr snowballporterfilterfactory, solr snowballporterfilterfactory example, solr stemming example, solr xml indexing, Tech Mahindra interview questions and answers, UnitedHealth Group interview questions and answers, Virtusa Consulting Services Pvt Ltd interview questions and answers, Wells Fargo interview questions and answers, WM Global Technology Services India Pvt Ltd interview questions and answers, Xoriant Solutions Pvt Ltd interview questions and answers