Solr represents data

  • In Apache Solr, a Document is the part of search as well as index.
  • Index consists of one or more Documents and then Document consists of one or more Fields.
  • In database terminology,a Document corresponds to a row of the table, and a Field corresponds to a column of the table.
apache solr with hadoop

Schema

  • Before adding documents to Solr, you need to specify the schema, represented in a file called schema.xml.
  • It is not suitable to modify the schema after documents has added to the index.

The schema declares:

  1. what kinds of fields there are
  2. which field should be used as the unique/primary key
  3. which fields are required
  4. how to index and search each field

Field Types

  • In Solr, every field has a type.
  • Apache Solr expands the variety of field types offered in Lucene.

Examples of basic field types available in Solr include:

  1. float
  2. long
  3. double
  4. date
  5. text

Categorized in:

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,