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 prerna07 <pk...@sapient.com> on 2009/01/14 15:36:47 UTC

How to do Query on multiple parameters


Our requirement is to make solr query on two or more attributes. for example
the search criteria is DaVinci AND price between 10 TO 40
The query i am using is ;
?q=DaVinci&q=Price:[10 TO 40]

this query is returning me results for first query parameter only
(?q=DaVinc).

What should be the query for such multiple parameters.

Thanks,
Prerna
-- 
View this message in context: http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p21457148.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How to do Query on multiple parameters

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
or perhaps better is to use fq parameters to separate out filters  
versus full-text queries:

   ?q=DaVinci&fq=Price:[10 TO 40]

	Erik


On Jan 14, 2009, at 9:50 AM, Jana, Kumar Raja wrote:

> Isn't this a single query on 2 parameters/fields?
>
> Try q=DaVinci AND Price:[10 TO 40]
>
> -----Original Message-----
> From: prerna07 [mailto:pkhandelwal2@sapient.com]
> Sent: Wednesday, January 14, 2009 8:07 PM
> To: solr-user@lucene.apache.org
> Subject: How to do Query on multiple parameters
>
>
>
> Our requirement is to make solr query on two or more attributes. for
> example
> the search criteria is DaVinci AND price between 10 TO 40
> The query i am using is ;
> ?q=DaVinci&q=Price:[10 TO 40]
>
> this query is returning me results for first query parameter only
> (?q=DaVinc).
>
> What should be the query for such multiple parameters.
>
> Thanks,
> Prerna
> -- 
> View this message in context:
> http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p
> 21457148.html
> Sent from the Solr - User mailing list archive at Nabble.com.


RE: How to do Query on multiple parameters

Posted by prerna07 <pk...@sapient.com>.
Thanks, it works..:)


Jana, Kumar Raja wrote:
> 
> Isn't this a single query on 2 parameters/fields?
> 
> Try q=DaVinci AND Price:[10 TO 40]
> 
> -----Original Message-----
> From: prerna07 [mailto:pkhandelwal2@sapient.com] 
> Sent: Wednesday, January 14, 2009 8:07 PM
> To: solr-user@lucene.apache.org
> Subject: How to do Query on multiple parameters
> 
> 
> 
> Our requirement is to make solr query on two or more attributes. for
> example
> the search criteria is DaVinci AND price between 10 TO 40
> The query i am using is ;
> ?q=DaVinci&q=Price:[10 TO 40]
> 
> this query is returning me results for first query parameter only
> (?q=DaVinc).
> 
> What should be the query for such multiple parameters.
> 
> Thanks,
> Prerna
> -- 
> View this message in context:
> http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p
> 21457148.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p21470690.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: How to do Query on multiple parameters

Posted by "Jana, Kumar Raja" <kj...@ptc.com>.
Isn't this a single query on 2 parameters/fields?

Try q=DaVinci AND Price:[10 TO 40]

-----Original Message-----
From: prerna07 [mailto:pkhandelwal2@sapient.com] 
Sent: Wednesday, January 14, 2009 8:07 PM
To: solr-user@lucene.apache.org
Subject: How to do Query on multiple parameters



Our requirement is to make solr query on two or more attributes. for
example
the search criteria is DaVinci AND price between 10 TO 40
The query i am using is ;
?q=DaVinci&q=Price:[10 TO 40]

this query is returning me results for first query parameter only
(?q=DaVinc).

What should be the query for such multiple parameters.

Thanks,
Prerna
-- 
View this message in context:
http://www.nabble.com/How-to-do-Query-on-multiple-parameters-tp21457148p
21457148.html
Sent from the Solr - User mailing list archive at Nabble.com.