Which Fields Can Be Facets
Facet Filter Mapping lists the fields that hold data in your index, read from the index each time you open it. Text values, numbers and dates are listed. Long text meant for searching, such as titles and page text, is not.
Fields Opensolr fills for you
On every page it crawls, Opensolr reads more than the text. These fields are the most useful as facets:
content_typeThe kind of file: web page, PDF, Word document and so on. Widget: List.
meta_detected_language and meta_og_localeThe language and the locale of the page. Visitors already have them in the language and locale lists above the results (more). Widget: List.
creation_dateThe date of the page. Widget: Date Range Picker.
price_f, currency_s and product_category_smThe price, the currency and the categories of a product page (Prices and product categories). Widgets: Min/Max Slider for the price, List for the others.
breadcrumb_1_sm to breadcrumb_6_smThe levels of the breadcrumb on the page, from the top category down. Widget: Hierarchical, starting at the level you choose.
video_duration_iThe length in seconds of a video on the page. Widget: Duration.
keywords_smThe keywords of the page. Widget: List.
Structured data from your pages
When your pages carry schema.org data (JSON-LD or microdata), each property becomes a field. Its name comes from the property, with nested properties joined by underscores, for example brand_name_sm. Its ending tells its type: _sm text, _fm decimal number, _im whole number, _dtm date. The richer the data on your pages, the more facets you can offer.
Your own fields
With Data Ingestion you send your own fields. Name them with a type ending and they show up in Facet Filter Mapping with the widgets that fit:
- Text, ending
_s,_smor_ss: List. Add a level number in the name, such ascategory_1_sm,category_2_sm, and Hierarchical is offered too. - Numbers, ending
_i,_l,_f,_d,_imor_fm: List or Min/Max Slider. Whole numbers ending_ior_lcan also use Duration. - Dates, ending
_dtor_dtm: List or Date Range Picker.
Every ending and what it does: Type suffixes.
Facet filter pages
- Facet filters overview
- The five widgets
- Set up your facets
- Which fields can be facets