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 16:16:23 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=6&rev2=7

   </updateHandler>
  }}}
  
- === HTTP requests ===
+ === Homemade requests ===
  
- Add &semantics=XXXX, where XXXX is "semantics=db-insert" or "semantics=db-update" (or
one of the classic semantics), to you HTTP update requests.
+ ==== Requst level control ====
  
- ==== JSON ====
+ Add "&semantics=XXXX", where XXXX is "semantics=db-insert" or "semantics=db-update"
(or one of the classic semantics), to your HTTP update requests. The semantics provided at
request level is the default which will be used for add operations where semantics not specifically
provided (see sections below). In general 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.
  
+ ==== Add-operation level control - JSON ====
+ 
- Add semantics field to your "add" JavaScript Objects (see more [[UpdateJSON|here]])
+ And/or add semantics field to your "add" JavaScript Objects (see more [[UpdateJSON|here]])
  {{{#!json
  {
  "add": {
@@ -70, +72 @@

  }
  }}}
  
- ==== XML ====
+ ==== Add-operation level control - XML ====
  
- Add semantics attribute to your add tags (see more [[UpdateXMLMessages|here]])
+ And/or add semantics attribute to your add tags (see more [[UpdateXMLMessages|here]])
  {{{#!xml
  <add semantics="XXXX">
    ...
  </add>
  }}}
  
- === SolrJ ===
+ === SolrJ requests ===
  
+ ==== Requst level control ====
+ 
+ {{{#!java
+ SolrServer server = ...
+ SolrInputDocument document = ...    
+ UpdateRequest request = new UpdateRequest();
+ request.add(document);
+ request.setParam(UpdateParams.UPDATE_SEMANTICS, UpdateSemantics.XXXX.toString());
+ request.process(server);
+ }}}
+ 
+ ==== 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.
+ 
+ === Catching errors ===
+ 
+ ==== Homemade requests ====
+ 
+ ==== SolrJ requests ====
+ 

Mime
View raw message