Synonyms feature to be enabled on documents in Solr.

I have one field in solr that has the content of a document.( say field name
: document_data).

The data in that field is :

"Tamil Nadu state private school fee determination committee headed by
Justice Raviraja has submitted the private schools fees structure to the
district educational officers on Monday"

Synonyms for private school in synonym flat file are :

Private schools,NGO Schools,Unaided schools


Now when i search on this field as  document_data=unaided schools.  I need
to get the results.

What are the token, analyser filter that i can apply  to the
"document_dataFIELD" in order to get the results above




This is the indexed document :
<add>
<doc>
<field name="ID">SOLR200</field>
<field name="document_data">Tamil Nadu state private school fee
determination committee headed by Justice Raviraja has submitted the private
schools fees structure to the district educational officers on
Monday</field>
</doc>
</add>


Right now i tried for these 2 fields type.. And i couldn't get the above
results

 <fieldType name="Synonym_document" class="solr.TextField"
positionIncrementGap="100" >
        <analyzer>
  <tokenizer class="solr.KeywordTokenizerFactory"/>
    <filter class="solr.SynonymFilter" synonyms="Taxonomy.txt"
ignoreCase="true" expand="true"/>
 <filter class="solr.LowerCaseFilterFactory"/>
 <filter class="solr.SnowballPorterFilterFactory" language="English"
protected="protwords.txt"/>
      </analyzer>
    </fieldType>


 <fieldType name="Synonym_document" class="solr.TextField"
positionIncrementGap="100" >
        <analyzer>
     <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    <filter class="solr.SynonymFilter" synonyms="Taxonomy.txt"
ignoreCase="true" expand="true"/>
 <filter class="solr.LowerCaseFilterFactory"/>
 <filter class="solr.SnowballPorterFilterFactory" language="English"
protected="protwords.txt"/>
      </analyzer>
    </fieldType>


 <field name="document_data" type="Synonym_document" indexed="true"
multiValued="true"/>

Both didn't work for my query.
Anyone please guide me with the token, analyser filter that i can apply  to
the "document_data FIELD" in order to get the results above


Regards,
Rajani

Reply via email to