11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Manage Configuration Files.<br />

<strong>Solr</strong> Field Types<br />

The field type defines how <strong>Solr</strong> should interpret data in a field and how the field can be queried. There are many<br />

field types included with <strong>Solr</strong> by default, and they can also be defined locally.<br />

Topics covered in this section:<br />

Field Type Definitions and Properties<br />

Field Types Included with <strong>Solr</strong><br />

Working with Currencies and Exchange Rates<br />

Working with Dates<br />

Working with Enum Fields<br />

Working with External Files and Processes<br />

Field Properties by Use Case<br />

Related Topics<br />

SchemaXML-DataTypes<br />

FieldType Javadoc<br />

Field Type Definitions and Properties<br />

A field type definition can include four types of information:<br />

The name of the field type (mandatory)<br />

An implementation class name (mandatory)<br />

If the field type is TextField, a description of the field analysis for the field type<br />

Field type properties - depending on the implementation class, some properties may be mandatory.<br />

Field Type Definitions in schema.xml<br />

Field types are defined in schema.xml. Each field type is defined between fieldType elements. They can<br />

optionally be grouped within a types element. Here is an example of a field type definition for a type called tex<br />

t_general:<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

50

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!