hi
have any idea about implement atomic update with pysolr.?
i found this in solrJ:
HttpSolrClient client = new HttpSolrClient("http://localhost:8983/solr";);

// create the document
SolrInputDocument sdoc = new SolrInputDocument();
sdoc.addField("id","book1");
Map<String,Object> fieldModifier = new HashMap<>(1);
fieldModifier.put("add","Cyberpunk");
sdoc.addField("cat", fieldModifier);  // add the map as the field value

client.add( sdoc );  // send it to the solr server

client.close();  // shutdown client before we exit

how i implement this in pysolr?

conn = pysolr.Solr('http://localhost:8983/solr/post')

docs=[{'id':'post1','title':'this is a test','member_id':{"inc":12}}]

conn.add(docs)
this throw an error in :

member_id':{"inc":12}

any idea to implement atomic update?to increament just member_id field

Reply via email to