lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Is copyField a must?
Date Wed, 13 May 2015 21:58:25 GMT
On 5/13/2015 3:36 PM, Steven White wrote:
>   <requestHandler name="/select_group_a" class="solr.SearchHandler">
>      <lst name="defaults">
>        <str name="echoParams">explicit</str>
>        <int name="rows">20</int>
>        <str name="df">F2,F3,F5</str>
>    <str name="fl">id,score</str>
>      </lst>
>   </requestHandler>
> However, this isn't working because whatever is in "df" is being treated as
> single field name.

The df parameter is shorthand for "default field."  It is, by
definition, a single field -- it is the field searched by default when
you don't specify a field directly in a query handled by the default
(lucene) query parser.  The default parser doesn't search multiple
fields for your search terms.

What you're going to want to do here is use a different query parser --
dismax or edismax -- and put your field list in the qf field, separated
by spaces rather than commas.  The qf parameter means "query fields" and
is specific to the dismax/edismax parsers.  Depending on your exact
needs, you may also want to define the pf parameter as well (phrase fields).

There is a LOT of detail on these parsers, so I'll give you the
documentation links rather than try and explain everything:


View raw message