Quite frankly if you can't just configure this in DIH I'd do all the
indexing from SolrJ.

Long blog on the subject here:
https://lucidworks.com/2012/02/14/indexing-with-solrj/

Best,
Erick

On Thu, Sep 21, 2017 at 8:17 AM, solr2020 <psgoms...@gmail.com> wrote:
> Hi All,
>
> We are retrieving mongodb data using Dataimport handler. We have a scenario
> where we have to overwrite the mongodb query configured in data-config file.
> We have to do this overwrite programmatically using solrj. For this we are
> using ModifiableSolrParams to set the parameters. Here is the code snippet
> used to create a dataimport http request.
>
>                 String solrURL=
> "http://<server>:<port>/solr/collectionname";
>                 SolrClient solr = new HttpSolrClient.Builder(solrURL).build();
>                 ModifiableSolrParams params = new ModifiableSolrParams();
>                 params.set("qt", "/dataimport");
>                 params.set("command", "full-import");
>                 params.set("query=id:{ $in: ", idlist+ " }");
>                 QueryResponse response = solr.query(params);
>
> Here the expectation is it should use this query parameter value given in
> the code snippet instead of using the query parameter configured in
> data-config file.
>
> Is there a way to do this? .Please suggest.
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to