Dynamic Fields: Title Author Keywords Body Catchall Solrconfig - XML Catchall
Dynamic Fields: Title Author Keywords Body Catchall Solrconfig - XML Catchall
Dynamic Fields: Title Author Keywords Body Catchall Solrconfig - XML Catchall
The copyField command can use a wildcard (*) character in the dest parameter only if the
source parameter contains one as well. copyField uses the matching glob from the source
field for the dest field name into which the source content is copied.
Copying is done at the stream source level and no copy feeds into another copy. This means
that copy fields
cannot be chained i.e., you cannot copy from here to there and then from there to
elsewhere. However, the
same source field can be copied to multiple destination fields:
Apache Solr Reference Guide 7.7 Page 177 of 1426
c 2019, Apache Software Foundation Guide Version 7.7 - Published: 2019-03-04
<copyField source="here" dest="there"/>
<copyField source="here" dest="elsewhere"/>
Page 178 of 1426 Apache Solr Reference Guide 7.7
Guide Version 7.7 - Published: 2019-03-04 c 2019, Apache Software Foundation
Dynamic Fields
Dynamic fields allow Solr to index fields that you did not explicitly define in your schema.
This is useful if you discover you have forgotten to define one or more fields. Dynamic
fields can make your
application less brittle by providing some flexibility in the documents you can add to Solr.
A dynamic field is just like a regular field except it has a name with a wildcard in it. When
you are indexing
documents, a field that does not match any explicitly defined fields can be matched with a
dynamic field.
For example, suppose your schema includes a dynamic field with a name of *_i. If you attempt
to index a
document with a cost_i field, but no explicit cost_i field is defined in the schema, then
the cost_i field will
have the field type and analysis defined for *_i.
Like regular fields, dynamic fields have a name, a field type, and options.
<dynamicField name="*_i" type="int" indexed="true" stored="true"/>
It is recommended that you include basic dynamic field mappings (like that shown above) in
your
schema.xml. The mappings can be very useful.
Apache Solr Reference Guide 7.7 Page 179 of 1426
c 2019, Apache Software Foundation Guide Version 7.7 - Published: 2019-03-04
Schema API
The Schema API allows you to use an HTTP API to manage many of the elements of your schema.
The Schema API utilizes the ManagedIndexSchemaFactory class, which is the default schema
factory in
modern Solr versions. See the section Schema Factory Definition in SolrConfig for more
information about
choosing a schema factory for your index.
This API provides read and write access to the Solr schema for each collection (or core, when
using
standalone Solr). Read access to all schema elements is supported. Fields, dynamic fields,
field types and
copyField rules may be added, removed or replaced. Future Solr releases will extend write
access to allow
more schema elements to be modified.