Solr如何只获得完全匹配

问题描述

示例标签字段。

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

当我在标签字段中搜索关键字土地时,我得到的结果包含陆地车辆

q=tags:land

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

我不希望这产生匹配。

<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

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)