You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Karl Wright <da...@gmail.com> on 2018/04/25 13:13:32 UTC

Question about sending parameters to Solr via SolrJ when SolrCloud is involved

ManifoldCF uses SolrJ to send documents to Solr.  There are two possible
models you can configure for the documents themselves -- either using the
extracting update handler, or using the standard
SolrClient.add(SolrInputDocument).  This occurs in the context of either
stand-alone Solr, or Solr Cloud.

We have the facility to send parameters to Solr, like the "processor="
parameter, using any combination of the above configurations.  Our support
for the extracting update handler includes these parameters in a multi-part
form POST, and that works perfectly.  But we have no working way to submit
the parameters when using SolrClient.add(SolrInputDocument).  Using
SolrInputDocument.addField() for these parameters does not work, as you
might expect.

When MCF constructs the standalone Solr URL we can provide the parameters
on it, and that works.  But when we construct the SolrCloud SolrClient, it
isn't clear at all how we should provide parameters.

What is the right way to handle this case?

Thanks in advance for your help.
Karl

Re: Question about sending parameters to Solr via SolrJ when SolrCloud is involved

Posted by David Smiley <da...@gmail.com>.
Hi Karl,

If you look at the source/implementation of SolrClient.add, you should
eventually see that it's implemented by creating an UpdateRequest and
adding the document to it.  You can add parameters to that request.

BTW this inquiry seems better suited to the solr-user list.

~ David

On Wed, Apr 25, 2018 at 9:13 AM Karl Wright <da...@gmail.com> wrote:

> ManifoldCF uses SolrJ to send documents to Solr.  There are two possible
> models you can configure for the documents themselves -- either using the
> extracting update handler, or using the standard
> SolrClient.add(SolrInputDocument).  This occurs in the context of either
> stand-alone Solr, or Solr Cloud.
>
> We have the facility to send parameters to Solr, like the "processor="
> parameter, using any combination of the above configurations.  Our support
> for the extracting update handler includes these parameters in a multi-part
> form POST, and that works perfectly.  But we have no working way to submit
> the parameters when using SolrClient.add(SolrInputDocument).  Using
> SolrInputDocument.addField() for these parameters does not work, as you
> might expect.
>
> When MCF constructs the standalone Solr URL we can provide the parameters
> on it, and that works.  But when we construct the SolrCloud SolrClient, it
> isn't clear at all how we should provide parameters.
>
> What is the right way to handle this case?
>
> Thanks in advance for your help.
> Karl
>
>
>
>
>
> --
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com