You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Faire Mii <fa...@gmail.com> on 2009/12/15 13:05:14 UTC
search in all fields for multiple values?
i have two fields:
title
body
and i want to search for two words
dog
OR
cat
in each of them.
i have tried q=*:dog OR cat
but it doesnt work.
how should i type it?
PS. could i enter default search field = ALL fields in schema.xml in
someway?
Re: search in all fields for multiple values?
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Tue, Dec 15, 2009 at 5:35 PM, Faire Mii <fa...@gmail.com> wrote:
> i have two fields:
>
> title
> body
>
> and i want to search for two words
>
> dog
> OR
> cat
>
> in each of them.
>
> i have tried q=*:dog OR cat
>
> but it doesnt work.
>
> how should i type it?
>
> PS. could i enter default search field = ALL fields in schema.xml in
> someway?
>
See
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_search_for_.22superman.22_in_both_the_title_and_subject_fields
You can also create a copyField to which you can copy both title and body
and specify that as the default search field.
--
Regards,
Shalin Shekhar Mangar.