lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Trivial Update of "SchemaXml" by ErickErickson
Date Thu, 18 Oct 2012 11:02:19 GMT
Dear Wiki user,

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

The "SchemaXml" page has been changed by ErickErickson:

Added comments about _version_ and keeping id as-is.

  == Fields ==
  The `<fields>` section is where you list the individual `<field>` declarations
you wish to use in your documents.  Each `<field>` has a `name` that you will use to
reference it when adding documents or executing searches, and an associated `type` which identifies
the name of the fieldtype you wish to use for this field. There are various field options
that apply to a field. These can be set in the field type declarations, and can also be overridden
at an individual field's declaration.
+ === Recommended fields ===
+ While these fields aren't strictly mandatory (Solr will run if you remove them fully), Bad
Things happen in some situations if they aren't defined. We recommend that you leave these
fields alone. If you don't use them, there's no appreciable penalty.
+  * id - Almost all Solr installations have this field defined as the <uniqueKey> (see
+  * _version_ <!> [[Solr4]] - This field is used for optimistic locking in [[|SolrCloud]]
and it enables [[|Real Time Get]]. If you remove it
you must also remove the transaction logging from solrconfig.xml, see [[|Real
Time Get]].
  === Common field options ===
  Common options that fields can have are...
@@ -115, +120 @@

  === The Unique Key Field ===
  The `<uniqueKey>` declaration can be used to inform Solr that there is a field in
your index which should be unique for all documents.  If a document is added that contains
the same value for this field as an existing document, the old document will be deleted.
- It is not mandatory for a schema to have a uniqueKey field.
+ It is not mandatory for a schema to have a uniqueKey field, but an overwhelming majority
of them do.  It ''shouldn't'' matter whether you rename this to something else (and change
the <uniqueKey> value), but occasionally it has in the past. We recommend that you just
leave this definition alone.
  Note that if you have enabled the QueryElevationComponent in solrconfig.xml it requires
the schema to have a uniqueKey of type StrField.  It cannot be, for example, an int field.

View raw message