Sure, you CAN do this, but why would you want to? I mean, what exactly is
the motivation here? If you truly have custom code to execute, fine, but if
all you are trying to do is set parameters, a custom request handler is
hitting a tack with a sledge hammer. For example, why isn't setting
defaults in solrconfig sufficient for your needs? At least then you can
change parameters with a simple text edit rather than require a Java build
and jar deploy.

Can you share what some of the requirements are for your custom request
handler, including the motivation? I'd hate to see you go off and invest
significant effort in a custom request handler when simpler techniques may
suffice.

-- Jack Krupansky

On Sat, Jan 9, 2016 at 12:08 PM, Ahmet Arslan <iori...@yahoo.com.invalid>
wrote:

> 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 <
> mark123lea...@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.
>

Reply via email to