Facet Mapping
Map a Drupal field, such as a brand, a color or a taxonomy, to a field of your Opensolr Index. Once your content is indexed again, it can be a facet, a sort, or the image of your results.
Add a mapping
- Drupal Field: pick the field. Each option tells you whether the field holds one value or many, and of what kind.
- Solr Field Name: the name in your index, filled in from the Drupal field. Change it if you like, for example
brand. - Solr Type: suggested for you from the Drupal field; check it against the table below.
- Display Label: the name visitors see, for example Brand.
- Add another mapping for the next field, Remove to drop one, then Save configuration.
Solr Type
| Kind of value | One value | Many values |
|---|---|---|
| Text (a brand, a tag) | String (single), _s, the default | String (multi-value), _sm |
| Decimal number (a price, a weight) | Float (single), _f | Float (multi-value), _fm |
| Whole number (a year, seconds) | Integer (single), _i | Integer (multi-value), _im |
| Date | Date (single), _dt | Date (multi-value), _dtm |
The field lands in your index as its name plus that ending, for example brand_s. A Drupal field that allows several values must use a multi-value type; the form refuses a single-value type for it. String (single, legacy), _ss, is kept for older setups.
A new mapping only reaches documents indexed after it. Run Ingest All Now, or Reindex Everything if you crawl. Then the field appears in Facet Configuration.
Both ways in carry your mappings: Data Ingestion writes them into each document, and the Data Crawler reads them from meta tags the module adds to your pages. More on custom fields: Dynamic fields.
Facets
- Facets
- Facet Mapping
- Facet Configuration
- Hierarchical Categories