Re: SOLRJ Atomic updates of String field

2014-11-11 Thread Anurag Sharma
Sorry didn't get what you are trying to achieve and the issue.

On Wed, Nov 12, 2014 at 12:20 AM, bbarani  wrote:

> I am using the below code to do partial update (in SOLR 4.2)
>
> partialUpdate = new HashMap();
> partialUpdate.put("set",Object);
> doc.setField(description, partialUpdate);
> server.add(docs);
> server.commit();
>
> I am seeing the below description value with {set =...}, Any idea why this
> is getting added?
>
> 
> {set=The iPhone 6 Plus features a 5.5-inch retina HD display, the A8 chip
> for faster processing and longer battery life, the M8 motion coprocessor to
> track speed, distance and elevation, and with an 8MP iSight camera, you can
> record 1080p HD Video at 60 FPS!}
> 
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/SOLRJ-Atomic-updates-of-String-field-tp4168809.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: SOLRJ Atomic updates of String field

2014-11-11 Thread Ahmet Arslan
Hi Bbarani,

Partial update solrJ example can be found in : 
http://find.searchhub.org/document/5b1187abfcfad33f

Ahmet



On Tuesday, November 11, 2014 8:51 PM, bbarani  wrote:
I am using the below code to do partial update (in SOLR 4.2)

partialUpdate = new HashMap();
partialUpdate.put("set",Object);
doc.setField(description, partialUpdate);
server.add(docs);
server.commit();

I am seeing the below description value with {set =...}, Any idea why this
is getting added?


{set=The iPhone 6 Plus features a 5.5-inch retina HD display, the A8 chip
for faster processing and longer battery life, the M8 motion coprocessor to
track speed, distance and elevation, and with an 8MP iSight camera, you can
record 1080p HD Video at 60 FPS!}




--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLRJ-Atomic-updates-of-String-field-tp4168809.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: SOLRJ Atomic updates of String field

2014-11-12 Thread Anurag Sharma
I understood the query now.
Atomic Update and Optimistic Concurrency are independent in Solr version >
5.
Not sure about version 4.2, if they are combined in this version a
_version_ field is needed to pass in every update. The atomic/partial
update will succeed if version in the request and indexed doc matches
otherwise response will have HTTP error code 409.

You can try by passing the _version_ of indexed doc during update.

It's also good to add a unit test in Solr for partial update which
currently I see missing.

On Wed, Nov 12, 2014 at 1:00 PM, Ahmet Arslan 
wrote:

> Hi Bbarani,
>
> Partial update solrJ example can be found in :
> http://find.searchhub.org/document/5b1187abfcfad33f
>
> Ahmet
>
>
>
> On Tuesday, November 11, 2014 8:51 PM, bbarani  wrote:
> I am using the below code to do partial update (in SOLR 4.2)
>
> partialUpdate = new HashMap();
> partialUpdate.put("set",Object);
> doc.setField(description, partialUpdate);
> server.add(docs);
> server.commit();
>
> I am seeing the below description value with {set =...}, Any idea why this
> is getting added?
>
> 
> {set=The iPhone 6 Plus features a 5.5-inch retina HD display, the A8 chip
> for faster processing and longer battery life, the M8 motion coprocessor to
> track speed, distance and elevation, and with an 8MP iSight camera, you can
> record 1080p HD Video at 60 FPS!}
> 
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/SOLRJ-Atomic-updates-of-String-field-tp4168809.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>