Hi Zahra,

To answer your question on seeing "No such processor atomic" with
AtomicUpdateProcessorFactory;

The feature is introduced in Solr 6.6.1 and 7.0 and is available in the
versions later.

I am trying the below on v 7.4 and it is working fine, without adding any
component on solrconfig.xml:


> http://localhost:8983/solr/collectio1/update/json/docs?processor=atomic&atomic.my_newfield=add&atomic.subject=set&atomic.count_i=inc&commit=true
> --data-binary {"id": 1,"title": "titleA"}
>

The Javadocs
<https://lucene.apache.org/solr/7_5_0//solr-core/org/apache/solr/update/processor/AtomicUpdateProcessorFactory.html>
are broken and I am working on fixing it.

Amrit Sarkar
Search Engineer
Lucidworks, Inc.
415-589-9269
www.lucidworks.com
Twitter http://twitter.com/lucidworks
LinkedIn: https://www.linkedin.com/in/sarkaramrit2
Medium: https://medium.com/@sarkaramrit2


On Mon, Oct 29, 2018 at 7:26 PM Alexandre Rafalovitch <arafa...@gmail.com>
wrote:

> 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