lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "SchemaXml" by YonikSeeley
Date Fri, 01 Apr 2011 17:40:56 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 YonikSeeley.
The comment on this change is: polyfields are expert level - move to bottom, remove pointtype
example used for geosearch since it's not best practice, refer to example schema and spatial
page - DRY.


  `compressThreshold` is the minimum length required for text compression to be invoked. 
This applies only if `compressed=true`; a common pattern is to set `compressThreshold` on
the field type definition, and turn compression on and off in the individual field definitions.
- === Poly Field Types ===
- Some !FieldTypes can be "poly" field types.  A Poly !FieldType is one that can potentially
create multiple Fields per "declared" field.  The primary example in Solr is the PointType.
 Depending on the dimension specified, one or more Fields will be created.  For example:
- {{{
- <fieldType name="location" class="solr.PointType" dimension="2" subFieldTypes="double"/>
- }}}
- Declares a !FieldType that can be used to represent a point in 2 dimensions (i.e. a lat/lon).
 The subFieldTypes value tells Solr what the underlying representation will be for the values
in the field, in this case a !FieldType called "double".
- Thus, a Field declaration like:
- {{{
- <field name="store" type="location" indexed="true" stored="true"/>
- }}}
- can be indexed like:
- {{{
- <add>
- <doc>
- <field name="store">35.9,-79.0</field>
- </doc>
- </add>
- }}}
- Underneath the hood, Solr will create two fields (using dynamic fields) to store the information.
  == 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.
@@ -150, +127 @@

  === Similarity ===
  A `<similarity>` declaration can be used to specify the subclass of Similarity that
you want Solr to use when dealing with your index.  If no Similarity class is specified, the
Lucene !DefaultSimilarity is used.  Please see SolrPlugins for information on how to ensure
that your own custom Similarity can be loaded into Solr.
+ === Poly Field Types ===
+ Some !FieldTypes can be "poly" field types.  A Poly !FieldType is one that can potentially
create multiple Fields per "declared" field. Some examples include the !LatLonType and !PointType,
both which use multiple indexed fields internally to represent what the user sees as a single
value (e.g. "35.9,-79.0")
+ See the [[|example
schema]] or SpatialSearch for more info on using these field types.
  === TODO ===
  * Perhaps make a DTD for the schema.
  * Talk about omitNorms and positionIncrementGap wrt text fields

View raw message