Saturday, March 17, 2018

FW: In Place Updates not work as expected

-----Original Message-----
From: Emir Arnautović [mailto:emir.arnautovic@sematext.com]
Sent: 16 March 2018 21:21
To: solr-user@lucene.apache.org
Subject: Re: In Place Updates not work as expected

Hi,
That's how you build regular document. Incremental/atomic updates need to
use update commands.
Did not check latest Solrj, so maybe there is built in way of doing that,
but quick googling showed how it can be achieved:

SolrInputDocument doc2 = new SolrInputDocument();
Map<String,String> fpValue2 = new HashMap<String, String>();
fpValue2.put("add","fp2");
doc2.setField("FACTURES_PRODUIT", fpValue2); HTH, Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection Solr &
Elasticsearch Consulting Support Training - http://sematext.com/



> On 16 Mar 2018, at 15:36, mganeshs <mganeshs@live.in> wrote:
>
> Hi Emir,
>
> It's normal setfield and addDocument
>
> for ex.
> in a for loop
> solrInputDocument.setField(sFieldId, fieldValue);
> and after this, we add the created document.
> solrClient.add(collectionName, solrInputDocuments);
>
> I just want to know whether, we need to do something specific for in-place
> updates ?
>
> Kindly let me know,
>
> Regards,
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

No comments:

Post a Comment