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 kavurupavan <ka...@gmail.com> on 2016/04/27 12:47:01 UTC

How can i pass in solr dynamic values to a particular field

Solr url :

Example:

http://localhost:8983/solr/searching/select?q=*:*&fq=maths:25 AND science:
30

These 25 and 30 i need to pass dynamically values. How can I pass them as
part of a Solr URL? 
Please help me. Thanks in advance.



--
View this message in context: http://lucene.472066.n3.nabble.com/How-can-i-pass-in-solr-dynamic-values-to-a-particular-field-tp4273107.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How can i pass in solr dynamic values to a particular field

Posted by Erik Hatcher <er...@gmail.com>.
A couple of options - param substitution -

    fq=maths:${maths_v} AND science:${science_v}

        where &maths_v=25 and &science_v=30

And one I like better because it’s a more precisely defined query:

   fq=({!term f=maths v=$maths_v}) AND {!term f=science v=$science_v}


—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com <http://www.lucidworks.com/>



> On Apr 27, 2016, at 6:47 AM, kavurupavan <ka...@gmail.com> wrote:
> 
> Solr url :
> 
> Example:
> 
> http://localhost:8983/solr/searching/select?q=*:*&fq=maths:25 AND science:
> 30
> 
> These 25 and 30 i need to pass dynamically values. How can I pass them as
> part of a Solr URL? 
> Please help me. Thanks in advance.
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-can-i-pass-in-solr-dynamic-values-to-a-particular-field-tp4273107.html
> Sent from the Solr - User mailing list archive at Nabble.com.


RE: How can i pass in solr dynamic values to a particular field

Posted by kavurupavan <ka...@gmail.com>.
In solr terminal only to pass dynamic values



--
View this message in context: http://lucene.472066.n3.nabble.com/How-can-i-pass-in-solr-dynamic-values-to-a-particular-field-tp4273107p4273588.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: How can i pass in solr dynamic values to a particular field

Posted by ra...@maxval-ip.com.
HI kavurupavan,
    From which language you need to pass Dynamic Values.
 
 
 
-----------------------
Thanks and regards,
Rajesh Kumar Sountarrajan
Software Developer / DBA Developer - IT Team
 
Mobile: 91 - 9600984804
Email - rajeshkumar.s@maxval-ip.com
 
 
--------- Original Message --------- Subject: How can i pass in solr dynamic values to a particular field
From: "kavurupavan" <ka...@gmail.com>
Date: 4/27/16 4:17 pm
To: solr-user@lucene.apache.org

Solr url :
 
 Example:
 
 http://localhost:8983/solr/searching/select?q=*:*&fq=maths:25 AND science:
 30
 
 These 25 and 30 i need to pass dynamically values. How can I pass them as
 part of a Solr URL? 
 Please help me. Thanks in advance.
 
 
 
 --
 View this message in context: http://lucene.472066.n3.nabble.com/How-can-i-pass-in-solr-dynamic-values-to-a-particular-field-tp4273107.html
 Sent from the Solr - User mailing list archive at Nabble.com.