lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
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:

  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());
- ==== 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 ===

View raw message