You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2012/05/03 12:13:36 UTC

[Solr Wiki] Update of "Per Steffensen/Update semantics" by Per Steffensen

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=23&rev2=24

Comment:
The way to provide part references in CSV and JSON is not "similar to each other". Based on prefix nonfield telling the engine that it is not a real field

  
  {{{#!json
  [
-  { 'partref' : 'refA' ... set doc fields ..., '_version_' : -1}
+  { 'nonfield.partref' : 'refA' ... set doc fields ..., '_version_' : -1}
   ... add other docs ...
-  { 'partref' : 'refN' ... set doc fields ..., '_version_' : 1234567890}
+  { 'nonfield.partref' : 'refN' ... set doc fields ..., '_version_' : 1234567890}
  ]
  }}}
  
- Note that it is hard to see the difference between the "part reference" and a field called "partref". If the first "field" in the document has the name "partref" it is not considered as a field but as the "part reference". This means that if you have a real field called "partref" you cannot send it as the first field inside a document.
- 
  ===== CSV =====
  
  Provide "part references" and _version_-field-values in your CSV documents (see more [[UpdateCSV|here]]) like this:
+ {{{
-  * _version_ is actually just a field like anyone else - use fieldname "_version_"
-  * Also send "part reference" as a field like anyone else - use fieldname "nonfield.partref"
- 
- E.g.
-  * fieldnames=nonfield.partref,... doc field names ...,_version_
+ nonfield.partref,... set doc field names ...,_version_
-  * CSV lines:
- {{{
  refA,... set doc field values ...,-1
  ... add other docs ...
  refN,... set doc field values ...,1234567890