SOLR edismax搜索表达式

时间:2011-11-01 11:30:49

标签: solr edismax

我有一个字段“拼写”文字:

  p p p app app app app app app app app app class   盟

我如何搜索这样的内容:

http://localhost:8080/solr/select?q={!type=edismax qf=spell v='apposta apposta per'} OR {!type=edismax qf=spell v='sue prime ore al'} - incorrect

我的意思是如何在edismax查询中使用表达式 AND / OR / NOT

1 个答案:

答案 0 :(得分:2)

您可以简化配置

<requestHandler name="standard" class="solr.SearchHandler" default="true">
    <lst name="defaults">
        <str name="defType">edismax</str>
        <str name="echoParams">explicit</str>
        <str name="qf">spell</str>
        <str name="q.alt">*:*</str>
    </lst>
</requestHandler>

并尝试 -

http://localhost:8080/solr/select?q=(apposta apposta per) OR (sue prime ore al)