Re: Replacing a document in Solr5

2015-12-20 Thread Shyam R
+1 On Sun, Dec 20, 2015 at 10:28 PM, Debraj Manna wrote: > Thanks Andrea for the detailed explanation. > On Dec 19, 2015 1:34 PM, "Andrea Gazzarini" wrote: > > > That has nothing to do with your topic: addField adds a new value for a > > given field in a SolrInputDocument, while setField replac

Re: Replacing a document in Solr5

2015-12-20 Thread Debraj Manna
Thanks Andrea for the detailed explanation. On Dec 19, 2015 1:34 PM, "Andrea Gazzarini" wrote: > That has nothing to do with your topic: addField adds a new value for a > given field in a SolrInputDocument, while setField replaces any existing > value (of a given field, regardless what is the exi

Re: Replacing a document in Solr5

2015-12-19 Thread Andrea Gazzarini
That has nothing to do with your topic: addField adds a new value for a given field in a SolrInputDocument, while setField replaces any existing value (of a given field, regardless what is the existing value, I mean, regardless if that field has zero, one or more values). SolrInputDocument documen

Re: Replacing a document in Solr5

2015-12-18 Thread Debraj Manna
Ok. Then what is the difference between addField & setField

Re: Replacing a document in Solr5

2015-12-18 Thread Andrea Gazzarini
As far as I know, this is how Solr works (e.g. it replaces the whole document): how do you replace only a part of a document? Just send a SolrInputDocument with an existing (i.e. already indexed) id and the document (on Solr) will be replaced. Andrea 2015-12-19 8:16 GMT+01:00 Debraj Manna : > C

Replacing a document in Solr5

2015-12-18 Thread Debraj Manna
Can someone let me know how can I replace a document on each update in Solr 5.2.1 using SolrJ? I don;t want to update parts of the document. On doing update it should replace the entire document.