0

I have a field "spell" with text:

piazzata apposta apposta per tenere al caldo queste sue prime ore al mondo

How can I search something like this:

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

I mean how can I use expressions AND/OR/NOT in edismax query.

javanna
  • 59,145
  • 14
  • 144
  • 125
vladimir
  • 695
  • 3
  • 10
  • 23

1 Answers1

2

You can make your configurations simpler

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

and try -

http://localhost:8080/solr/select?q=(apposta apposta per) OR (sue prime ore al)
Jayendra
  • 52,349
  • 4
  • 80
  • 90
  • I added this instruction in solrconfig.xml restarted solr and tryed this query but solr returned me all records – vladimir Nov 01 '11 at 12:03
  • 1
    Its seems it is or for terms inside (). Try q=(apposta AND apposta AND per) OR (sue AND prime AND ore AND al) or q=("apposta apposta per") OR ("sue prime ore al") – Jayendra Nov 01 '11 at 13:02
  • AND and OR working fine for me now. Thanks. But how can I add NOT expression? – vladimir Nov 01 '11 at 13:56
  • 1
    e.g. q=(commercial AND banking) NOT (Wells Fargo) – Jayendra Nov 01 '11 at 14:02