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 "Vaijanath N. Rao" <va...@gmail.com> on 2008/07/30 15:17:30 UTC

Help with queries

Hi Solr-users,

I have few fields in solr, for example let name them f1,f2,f3 of which 
f3 is set a default field.
We have different boost for the different fields.  What I need is if 
someone types in a query let say x. I want solr to rank the documents 
based on how x appeared on all the fields and not just f3 (which is 
default field).

Is there a way other than I issuing f1:q f2:q q to solr to get the 
desired behavior.

--Thanks and Regards
Vaijanath

Re: Help with queries

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
If you use DisMax ( http://wiki.apache.org/solr/DisMaxRequestHandler ), then
you can set the "qf" parameter in solrconfig.xml to all three fields.

On Wed, Jul 30, 2008 at 6:47 PM, Vaijanath N. Rao <va...@gmail.com>wrote:

> Hi Solr-users,
>
> I have few fields in solr, for example let name them f1,f2,f3 of which f3
> is set a default field.
> We have different boost for the different fields.  What I need is if
> someone types in a query let say x. I want solr to rank the documents based
> on how x appeared on all the fields and not just f3 (which is default
> field).
>
> Is there a way other than I issuing f1:q f2:q q to solr to get the desired
> behavior.
>
> --Thanks and Regards
> Vaijanath
>



-- 
Regards,
Shalin Shekhar Mangar.

Re: Help with queries

Posted by "Vaijanath N. Rao" <va...@gmail.com>.
Hi Shalin and Erik,
DisMax works for me.

--Thanks and Regards
Vaijanath

Erik Hatcher wrote:
>
> On Jul 30, 2008, at 9:17 AM, Vaijanath N. Rao wrote:
>> Hi Solr-users,
>>
>> I have few fields in solr, for example let name them f1,f2,f3 of 
>> which f3 is set a default field.
>> We have different boost for the different fields.  What I need is if 
>> someone types in a query let say x. I want solr to rank the documents 
>> based on how x appeared on all the fields and not just f3 (which is 
>> default field).
>>
>> Is there a way other than I issuing f1:q f2:q q to solr to get the 
>> desired behavior.
>
> Sure thing... have a look at Solr's DisMax query parser:
>
>    <http://wiki.apache.org/solr/DisMaxRequestHandler>
>
>     Erik
>
>


Re: Help with queries

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 30, 2008, at 9:17 AM, Vaijanath N. Rao wrote:
> Hi Solr-users,
>
> I have few fields in solr, for example let name them f1,f2,f3 of  
> which f3 is set a default field.
> We have different boost for the different fields.  What I need is if  
> someone types in a query let say x. I want solr to rank the  
> documents based on how x appeared on all the fields and not just f3  
> (which is default field).
>
> Is there a way other than I issuing f1:q f2:q q to solr to get the  
> desired behavior.

Sure thing... have a look at Solr's DisMax query parser:

    <http://wiki.apache.org/solr/DisMaxRequestHandler>

	Erik