Search code examples
solredismax

SOLR edismax search with expressions


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.


Solution

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