2015-01-28 3 views
0

각 문서는 3 개의 필드로 구성되며 두 개의 필드는 정수이고 세 번째 필드는 발음 구별 기호가있는 아랍어 텍스트이므로 사용자는 구별 부호가 있거나없는 단어를 사용할 수도 있고 일부 문자는 발음 구별 부호를 가질 수 있습니다. 분음 부호가없는 다른 것들은 그러한 상황에서 도움이되는 schema.xml을 찾을 수 없습니다.Solr 아랍어 콘텐츠 색인 생성 (분음 부호 포함)

다음과 같이 제의 schema.xml 지금 :

<?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> 

내가 아랍어에 대한 synonyms.txt이 필요합니다.

+0

달성하려는 작업은 무엇입니까? 지금 색인을 생성하지 않습니까? 없으면 현재 schema.xml, solrconfig.xml을 표시하십시오 – Mysterion

답변

0

ICUTransformFilterFactory을 사용하려고합니다. 이해하기가 약간 어렵지만 필터 자체와 ICU 사용자 안내서에 대한 링크를 따라 가면 a lot of information을 찾을 수 있습니다.

일부는 이해하기가 쉽지 않으므로 the example I built for Thai language을 시작으로 유용하게 사용할 수 있습니다.

+1

중국어, 한국어 및 일본어 텍스트 solr-indexing을 위해 동료가 수행 한 작업을 참조하십시오. http://discovery-grindstone.blogspot.com/ It 상당한 일이지만 실행 가능합니다. –

1

schema.xml [슬라이드 18]에서 구성을 사용하기 위해 어떻게 생각하십니까?

Arabic Content with Apache Solr

+0

쿼리를 만들 때 여전히 결과를 얻을 수 없으며 인덱스가로드 될 때로드하지 못하기 때문에 마지막 두 필터를 주석 처리했습니다. –