Best way to perform search on several fields

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Best way to perform search on several fields

Pragyanshis Pattanaik



Hi,

I have to perform search on several fields for ex.(ProductName,ProductDescription,FeedBackOfProduct etc.).

Currently I have 2 approaches
1. I will copy all these searchable fields into one copy field and perform search on that field.
But problem here is How can I boost a perticular field say suppose only on ProductName.

2.Or I will search by field name and give boost accordingly.
ProductName:"Test"^50.0 ProductDescription:"Easy To Handle"~100^70.0

Please tell me which will the best approach.

Thanks in advance.



     
Reply | Threaded
Open this post in threaded view
|

Re: Best way to perform search on several fields

Marc Sturlese
If you don't care about giving different boosts depending on the field that matches, the approach of copying all field in just one is going to be faster.
Reply | Threaded
Open this post in threaded view
|

RE: Best way to perform search on several fields

Pragyanshis Pattanaik
Thanks for the reply

But i need to boost each field so the first approach might not be applicable here right ?

> Date: Thu, 7 Feb 2013 06:08:25 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: Re: Best way to perform search on several fields
>
> If you don't care about giving different boosts depending on the field that
> matches, the approach of copying all field in just one is going to be
> faster.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Best-way-to-perform-search-on-several-fields-tp4038996p4039002.html
> Sent from the Solr - User mailing list archive at Nabble.com.
     
Reply | Threaded
Open this post in threaded view
|

Re: Best way to perform search on several fields

Mikhail Khludnev
http://wiki.apache.org/solr/ExtendedDisMax


On Thu, Feb 7, 2013 at 6:53 PM, Pragyanshis Pattanaik <
[hidden email]> wrote:

> Thanks for the reply
>
> But i need to boost each field so the first approach might not be
> applicable here right ?
>
> > Date: Thu, 7 Feb 2013 06:08:25 -0800
> > From: [hidden email]
> > To: [hidden email]
> > Subject: Re: Best way to perform search on several fields
> >
> > If you don't care about giving different boosts depending on the field
> that
> > matches, the approach of copying all field in just one is going to be
> > faster.
> >
> >
> >
> > --
> > View this message in context:
> http://lucene.472066.n3.nabble.com/Best-way-to-perform-search-on-several-fields-tp4038996p4039002.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
>
>



--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <[hidden email]>