How to Read a Solr Schema - Fields, Dynamic Fields, Types

Fields, dynamic fields, field types and the switches on each

How to read a Solr schema

A schema.xml has three kinds of entries. Knowing them is enough to read the whole site search schema, or any other.

field
A named field with a type, such as title.
dynamicField
A name pattern, such as *_f. Any field whose name matches it is created the first time a document carries it, with that type. This is how you add fields without editing the schema: Add any field with a suffix.
fieldType
How values are kept and, for text, how they are cut into searchable words: How text is analysed.

The switches on a field

Each field carries a few switches. They decide what you can do with it.

indexed
The value can be searched and filtered. og_image is the only content field that is not: it comes back in results but cannot be searched.
stored
The original value is kept and comes back in results. Fields used only for matching (spell, the autocomplete fields, the phonetic_* fields and embeddings) are not stored, to save disk.
docValues
A column copy of the value for fast sorting, facets and functions. Every string, number and date field of this schema has it. Text fields cannot.
multiValued
The field can hold a list. _sm, _ss, _fm, _im, _dtm and _d are multi-valued; _s, _f, _i, _l, _dt and _b hold one value.
termVectors
The position of every word is kept, so highlighting is fast and exact. On for uri, title, description, text and every *_t field.

Results are scored with BM25, the Solr default. How much each field counts is set at search time in Field weights, not in the schema.

Schema reference pages

Back to Enterprise Site Search