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 2006/02/14 15:56:23 UTC

[Solr Wiki] Update of "CollectionBuilding" by YonikSeeley

Dear Wiki user,

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

The following page has been changed by YonikSeeley:
http://wiki.apache.org/solr/CollectionBuilding

The comment on the change is:
make employeeId distinct from id to avoid confusion

------------------------------------------------------------------------------
     {{{
  <add>
    <doc>
-     <field name="id">05991</field>
+     <field name="employeeId">05991</field>
      <field name="office">Bridgewater</field>
    </doc>
  </add>
@@ -68, +68 @@

     {{{
  <add allowDups="false" overwriteCommitted="true" overwritePending="true">
    <doc boost="2.5">
-     <field name="id">05991</field>
+     <field name="employeeId">05991</field>
      <field name="office" boost="2.0">Bridgewater</field>
    </doc>
  </add>
@@ -94, +94 @@

  }}}
  
  === "delete" by ID and by Query ===
+ Delete by id uses the uniqueKey field declared in the schema (in these examples, employeeId).
+ Delete by id is much more efficient than delete by query.
  Example:
     {{{
  <delete><id>05991</id></delete>
@@ -117, +119 @@

  
  {{{
  curl http://<hostname>:<port>/update --data-binary '/<add allowDups="false" overwriteCommitted="true" overwritePending="true">
- <doc boost="2.5"> <field name="id">05991</field>
+ <doc boost="2.5"> <field name="employeeId">05991</field>
  <field name="office" boost="2.0">Bridgewater</field> </doc> </add>'
  }}}