lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Updating a field on a document on index
Date Fri, 10 Aug 2012 15:16:05 GMT
One simple example is in the testUpdateField method of:

http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java

It creates a HashMap with a "set" command, and then adds that Map as the 
value for the field

    HashMap<String, Object> oper = new HashMap<String, Object>();  //need 
better api for this???
    oper.put("set",100);

     doc = new SolrInputDocument();
     doc.addField("id", "unique");
     doc.addField("_version_", version+1);
     doc.addField("price_f", oper);
     server.add(doc);

See this message:
http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201206.mbox/%3CCAPbUMQOcGuy3aEe7qqV6mDfpk4-O4bqy4Hn0iThBZszJt=Ahxg@mail.gmail.com%3E

There is more info in Jira as well (but I can't refer to it since Jira is 
still down.)

-- Jack Krupansky

-----Original Message----- 
From: deniz
Sent: Friday, August 10, 2012 2:55 AM
To: solr-user@lucene.apache.org
Subject: Updating a field on a document on index

Hi all,

I know we can now update a field on Solr 4.0 version, but I am just confused
how to do it on solrj client. I have found some examples but they were just
simple CURL commands in some shell scripts...

So I wanna ask if anyone is able to update fields by solrj? if yes, where to
find an example for the code?

thank you in advance



-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Updating-a-field-on-a-document-on-index-tp4000410.html
Sent from the Solr - User mailing list archive at Nabble.com. 


Mime
View raw message