In the solrj api, the value of a SolrInputField can be a map, in which case 
solrj adds an additional attribute to the field's xml element.
For example,
This code:

        SolrInputDocument doc = new SolrInputDocument();
        Map<String, String> partialUpdate = new HashMap<String, String>();
        partialUpdate.put("set", "foo");
        doc.addField("id", "test_123");
        doc.addField("description", partialUpdate);

yields this document:

<doc boost="1.0">
        <field name="id">test_123</field>
        <field name="description" update="set">foo</field>
</doc>

In this example I used the value "set" for this additional attribute, but it 
doesn't work. Solr doesn't update the field as I expected.
According to this link: 
http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/
valid values are "set" and "add".

Any idea?

Thanks,
Yoni


-----Original Message-----
From: Yoni Amir [mailto:yoni.a...@actimize.com] 
Sent: Saturday, September 01, 2012 1:48 PM
To: solr-user@lucene.apache.org
Subject: RE: solrj api for partial document update

Any word on this?
I inspected the solrj code an found nothing. It's a shame if the GA version 
comes out without such an api.
Thanks again,
Yoni

-----Original Message-----
From: Yoni Amir [mailto:yoni.a...@actimize.com] 
Sent: Thursday, August 30, 2012 8:48 AM
To: solr-user@lucene.apache.org
Subject: solrj api for partial document update

Is there a solrj api for partial document update in solr 4?

It is described here: 
http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/

That article explains how the xml structure should be. I want to use solrj api, 
but I can't figure out if it is supported.

Thanks,
Yoni

Reply via email to