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 2010/05/21 15:39:08 UTC

[Solr Wiki] Update of "SchemaXml" by FergusMcMenemie

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 FergusMcMenemie.
The comment on this change is: document the use of wildcard with copy field.
http://wiki.apache.org/solr/SchemaXml?action=diff&rev1=37&rev2=38

--------------------------------------------------

  
  The default operator used by Solr's query parser ([[http://lucene.apache.org/solr/docs/api/org/apache/solr/search/SolrQueryParser.html|SolrQueryParser]]) can be configured with <solrQueryParser defaultOperator="AND|OR"/>.  The default operator is "OR" if unspecified.
  
+ 
  <<Anchor(copyField)>>
  === Copy Fields ===
  
  Any number of `<copyField>` declarations can be included in your schema, to instruct Solr that you want it to duplicate any data it sees in the "source" field of documents that are added to the index, in the "dest" field of that document.  You are responsible for ensuring that the datatypes of the fields are compatible. The original text is sent from the "source" field to the "dest" field, before any configured analyzers for the originating or destination field are invoked.
  
  This is provided as a convenient way to ensure that data is put into several fields, without needing to include the data in the update command multiple times.
+ The maxChars property may be used in a copyField declaration.   This simply limits the number of characters copied.  For example:
  
- <!> [[Solr1.4]] The maxChars property may be used in a copyField declaration.   This simply limits the number of characters copied.  For example:
  {{{
   <copyField source="body" dest="teaser" maxChars="300"/>
  }}}
  
- === Similarity ===
+ A common requirement is to copy or merge all input fields into a single solr field. This can be done as follows:-
+ {{{
+  <copyField source="*" dest="text"/>
+ }}}
  
  
+ 
+ === 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.