Solr how to get only the exact match

270 Views Asked by At

Sample tags field.

"tags":["[\"Rectangle\",\"Product\",\"Font\",\"Rectangle\",\"Product\",\"Rectangle\",\"Snack\",\"Product\",\"Material property\",\"Product\",\"Material property\"]"],

When I search the keyword land in the tags field I get the results that contain land vehicle

q=tags:land

"tags":["[\"Land vehicle\",\"Vehicle\"]"] - 

I do not want this to produce a match.

<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true">
  <analyzer type="index">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.SynonymGraphFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
    <filter class="solr.StopFilterFactory" words="stopwords.txt" igno reCase="true"/>
    <filter class="solr.LowerCaseFilterFactory"/>
  </analyzer>
</fieldType>

<field name="tags" type="text_general">

Screenshot of an example document with the tags field as described above

0

There are 0 best solutions below