I am not sure. I haven't tried this particular path. Your original
question was without using SolrJ. Maybe others have.

However, I am also not sure how much sense this makes. This Atomic
processor is to make it easier to do the merge when you cannot modify
the source documents. But if you are already doing it from SolrJ, you
could do an update just as easily as trying the atomic approach.

Regards,
   Alex.
On Mon, 29 Oct 2018 at 09:40, Zahra Aminolroaya <z.aminolro...@gmail.com> wrote:
>
> Thanks Alex. I want to have a query for atomic update with solrj like below:
>
> http://localhost:8983/solr/test4/update?preprocessor=atomic&atomic.text2=set&atomic.text=set&atomic.text3=set&commit=true&stream.body=%3Cadd%3E%3Cdoc%3E%3Cfield%20name=%22id%22%3E11%3C/field%3E%3Cfield%20name=%22text3%22%20update=%22set%22%3Ehi%3C/field%3E%3C/doc%3E%3C/add%3E
>
>
> First, in solrj, I used "setfield" instead of "addfield" like
> doc.setField("text3", "hi");
>
>
> Then, I added ModifiableSolrParams :
>
>
> ModifiableSolrParams add = new ModifiableSolrParams()
>                     .add("processor", "atomic")
>                     .add("atomic.text", "set")
>                     .add("atomic.text2", "set")
>                     .add("atomic.text3", "set")
>                     .add(UpdateParams.COMMIT, "true")
>                     .add("commit","true");
>
> And then I updated my document:
>
> req.setParams(add);
> req.setAction( UpdateRequest.ACTION.COMMIT,false,false );
>  req.add(docs);
>  UpdateResponse rsp = req.process( server );
>
>
>
>  However, I get "No such processor atomic"
>
>
> As you see I set commit to true. What the problem is?
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to