Field Mappings: Send Your Own Fields

Page fields and categories as searchable fields

Field Mappings send the fields of your TYPO3 pages to your Opensolr Index: the author, the keywords, the categories, the last update date, the subtitle. Once a field is in the index, you can turn it into a filter of your search page. The section is at the top of the Facet Mapping tab.

Add a mapping

  1. Open Site Management > Opensolr Search, tab Facet Mapping.
  2. In TYPO3 Field, pick a page property: title, subtitle, nav_title, abstract, description, keywords, author, author_email, seo_title, og_title, og_description, twitter_title, twitter_description, lastUpdated, crdate, tstamp, slug, categories, doktype, layout or sys_language_uid.
  3. In Solr Field Name, give the field a short name, for example page_author.
  4. Pick the Solr Type. The extension pre-selects the type that fits the field: a date for the dates, a number for the numbers, a list of strings for categories and keywords.
  5. Give it a Display Label, for example "Author".
  6. Click + Add Field Mapping for more rows, then Save Facet Settings.
  7. Crawl or ingest your content again, so the new field reaches the index.

The types

The field in your index is the name plus the ending of its type: page_author with String (single) becomes page_author_s.

  • String (single) _s, the default, and String (multi-value) _sm. String (single, legacy) _ss is there for older setups.
  • Float (single) _f and Float (multi-value) _fm, for measures.
  • Integer (single) _i and Integer (multi-value) _im, for counts and lengths in seconds.
  • Date (single) _dt and Date (multi-value) _dtm.

Pick a multi-value type when a page can have several values, such as several categories or keywords. What these endings mean in your index: Dynamic fields.

How the values reach your index

  • Crawl: the extension writes each value in the page head as a tag named opensolr: plus the field, for example opensolr:page_author_s. The Data Crawler reads it. A multi-value field gets one tag per value.
  • Push: Data Ingestion sends the value with the page.

categories sends the titles of the page's system categories; keywords sends each keyword of the page properties as its own value.

Then use it

Once the field holds values in your index, it appears in the table below the mappings: Facet Configuration. It can also be the source of result pictures: Solr field for result image.

Facets