lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "Per Steffensen/Update semantics" by Per Steffensen
Date Fri, 09 Mar 2012 20:10:37 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "Per Steffensen/Update semantics" page has been changed by Per Steffensen:
http://wiki.apache.org/solr/Per%20Steffensen/Update%20semantics?action=diff&rev1=7&rev2=8

  
  {{{#!java
  SolrServer server = ...
- SolrInputDocument document = ...    
  UpdateRequest request = new UpdateRequest();
- request.add(document);
+ request.add(doc1);
+ request.add(doc2);
+ ...
+ request.add(docN);
  request.setParam(UpdateParams.UPDATE_SEMANTICS, UpdateSemantics.XXXX.toString());
  request.process(server);
  }}}
  
- ==== Operation level control ====
+ ==== Add-operation level control ====
  
- SolrJ doesnt yet support sending more AddUpdateRequests in the same HTTP request, but if/when
it gets supported by SolrJ, SolrJ should use add-operation level control if there are different
update semantics among the AddUpdateRequest it is about to send.
+ Remember, it is only meaningful to use add-operation level control when you send more than
one add-operation (and want different update semantics among those) within the same request.
+ 
+ SolrJ supports sending more UpdateRequests in the same HTTP request when you are using StreamingUpdateSolrServer
as server in the code above. If you repeat the lines creating and processing an UpdateRequest
(of course different document(s) and potentially params) quickly enough, StreamingUpdateSolrServer
might choose to send multiple of the UpdateRequests in the same HTTP request. StreamingUpdateSolrServer
will send params on operation level if necessary, so seen from the SolrJ user the code above
is really all you need to know.
  
  === Catching errors ===
  

Mime
View raw message