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] Trivial Update of "Per Steffensen/Update semantics" by Per Steffensen
Date Thu, 19 Apr 2012 10:52:38 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=19&rev2=20

Comment:
Correct escaping of CamelCase links

  As you know by now, in order to link errors in responses properly with the documents in
the request, you need to also add a "part reference" to all of you documents in the request.
If you dont explicitly provide a "part reference" for a document in a multi-document request,
and the handling of this particular document results in an error, the "part reference" in
the response will just be a random UUID and you will not be able to match errors in the response
with documents in the request.
  
  In the context of "update-add-docs" requests, 400 is always used as error-code. The following
error-types are relevant
-  * Error-namespace='''org.apache.solr.common.partialerrors.update''', error-name='''~DocumentDoesNotExist''':
Indicating that the document you tried to consistency-update does not exist (anymore)
+  * Error-namespace='''org.apache.solr.common.partialerrors.update''', error-name='''!DocumentDoesNotExist''':
Indicating that the document you tried to consistency-update does not exist (anymore)
-  * Error-namespace='''org.apache.solr.common.partialerrors.update''', error-name='''~DocumentAlreadyExists''':
Indicating that the document you tried to consistency-create already exists (or at least a
document with the same uniqueKey value)
+  * Error-namespace='''org.apache.solr.common.partialerrors.update''', error-name='''!DocumentAlreadyExists''':
Indicating that the document you tried to consistency-create already exists (or at least a
document with the same uniqueKey value)
-  * Error-namespace='''org.apache.solr.common.partialerrors.update''', error-name='''~VersionConflict''':
Indicating that the document you tried to consistency-update has changed since you fetched
it for update (version number has changed)
+  * Error-namespace='''org.apache.solr.common.partialerrors.update''', error-name='''!VersionConflict''':
Indicating that the document you tried to consistency-update has changed since you fetched
it for update (version number has changed)
-  * Error-namespace='''org.apache.solr.common.partialerrors''', error-name='''~WrongUsage''':
Indicating that you are using the features in a wrong way - e.g. if you try to do a consistency-insert/update
but there is no uniqueKey defined in your Solr schema or no value for the uniqueKey-field
of the document is specified in the request. 
+  * Error-namespace='''org.apache.solr.common.partialerrors''', error-name='''!WrongUsage''':
Indicating that you are using the features in a wrong way - e.g. if you try to do a consistency-insert/update
but there is no uniqueKey defined in your Solr schema or no value for the uniqueKey-field
of the document is specified in the request. 
  
  == Using it ==
  
@@ -62, +62 @@

  
  === Configuration of Solr server ===
  
- You control the semantics-mode by adding a semanticsMode tag inside your ~DirectUpdateHandler2-based
updateHandler. In solrconfig.xml:
+ You control the semantics-mode by adding a semanticsMode tag inside your !DirectUpdateHandler2-based
updateHandler. In solrconfig.xml:
  {{{#!xml
    <updateHandler class="solr.DirectUpdateHandler2">
      ...
@@ -83, +83 @@

  {{{#!xml
   <field name="_version_" type="long" indexed="true" stored="true" />
  }}}
-  * You need to enable updateLog in your ~DirectUpdateHandler2-based updateHandler. In solrconfig.xml:
+  * You need to enable updateLog in your !DirectUpdateHandler2-based updateHandler. In solrconfig.xml:
  {{{#!xml
   <updateHandler class="solr.DirectUpdateHandler2">
      ...
@@ -251, +251 @@

  docs.add(docN);
  }}}
  
- Note that it is not normal (as in the example above) to create a new ~SolrInputDocuments
with _version_ (~SolrInputDocument.VERSION_FIELD) field set to a hardcoded number above 0
(indicating update and not insert). A ~SolrInputDocument with _version_ above 0 will usually
have been populated from a document fetched (search og realtime-get) from Solr for modification
and restorage (update).
+ Note that it is not normal (as in the example above) to create a new !SolrInputDocuments
with _version_ (!SolrInputDocument.VERSION_FIELD) field set to a hardcoded number above 0
(indicating update and not insert). A !SolrInputDocument with _version_ above 0 will usually
have been populated from a document fetched (search og realtime-get) from Solr for modification
and restorage (update).
- No need to deal explicitly with "part references" - ~SolrInputDocument will handle it automatically
for you.
+ No need to deal explicitly with "part references" - !SolrInputDocument will handle it automatically
for you.
  
  ==== Sending requests ====
  
@@ -281, +281 @@

  }
  }}}
  
- The possible classes (subclasses of ~DocumentUpdatePartialError) of '''err''' are java-Exception
classes correspondig to the error-types mentioned above, where the package of the class corresponds
to the error-type-namespace and where the name of the class correspond to the error-type-name.
+ The possible classes (subclasses of !DocumentUpdatePartialError) of '''err''' are java-Exception
classes correspondig to the error-types mentioned above, where the package of the class corresponds
to the error-type-namespace and where the name of the class correspond to the error-type-name.
  
  If you only send one document in your request you can catch the java-Exception corresponding
to the error-type directly
  

Mime
View raw message