lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com.INVALID>
Subject Re: Dynamically Adding query parameters in my custom Request Handler class
Date Sat, 09 Jan 2016 17:08:58 GMT
Hi Mark,

Yes this is possible. Better, you can use a custom SearchComponent for this task too.
You retrieve solr parameters, wrap it into ModifiableSolrParams. Add extra parameters etc,
then pass it to underlying search components.

Ahmet


On Saturday, January 9, 2016 3:59 PM, Mark Robinson <mark123learns@gmail.com> wrote:
Hi,
When I initially fire a query against my Solr instance using SOLRJ I pass
only, say q=*:*&fq=(myfield:vaue1).

I have written a custom RequestHandler, which is what I call in my SolrJ
query.
Inside this custom request handler can I add more query params like say the
facets etc.. so that ultimately facets are also received back in my results
which were initially not specified when I invoked the Solr url using SolrJ.

In short, instead of constructing the query dynamically initially in SolrJ
I want to add the extra query params, adding a jar in Solr (a java code
that will check certain conditions and dynamically add the query params
after the initial SolrJ query is done). That is why I thought of a custom
RH which would help we write a java class and deploy in Solr.

Is this possible. Could some one get back please.

Thanks!
Mark.

Mime
View raw message