On 5/25/2017 12:45 AM, Zheng Lin Edwin Yeo wrote:
> Would like to check, is it possible to set a configuration in
> solrconfig.xml whereby the search will go through all the fields in the
> collections?
>
> Currently, I am defining the fields to be search under the "df" setting,
> but unlike "fl", I could not set it to the value "*". The only way which I 
> can think of currently is to list all the fields under the "df" setting. 
> However, this doesn't seems like a very good way, so I'm checking if there 
> are better methods.

As far as I'm aware, the df parameter (default field) can only take one
field.  I have never seen any ability to use more than one field there. 
If that actually works, then it is functionality that I've never seen.

If you switch to the dismax or edismax query parser, then you can list
multiple fields in the qf, pf, pf2, and pf3 parameters, but even then,
Solr does not provide a simple way to specify all fields.  You can
specify them all, but you have to do so one by one.

Searching all fields is usually very expensive anyway.

The method that Rick gave you, of copying all fields into a single field
that you can specify as the default field, is one way to do it, but be
aware that if you choose this method, every term will be analyzed in
exactly the same way.  This may not be what you want.  It also can
greatly increase the size of the index, affecting overall performance.

Thanks,
Shawn

Reply via email to