📌 Note: Facets are used to filter results. It would be best if you had your data feed indexed before configuring your facets.
The facets feature in the Doofinder admin panel is used to filter results. Once configured, the facets will appear in your Doofinder layer automatically. If you use our API directly, you will be able to add filters to your queries.
Log in to your Doofinder account and go to Setup> Settings > Facets to begin the configuration.
The Facets Configuration Screen
This screen is divided into the same number of sections as the number of indices defined for your search engine. Usually, there’s only one section: product.
Each indice section is also divided into two columns.
On the left column, you will find the available fields that Doofinder obtained from your data feed.
📌 Note: Some of the fields may have been modified for specific purposes. These could be keywords or field types, and others may have been removed from the list because they are well-known fields that are not intended for filtering such a
The right-hand column is where the enabled facets for your search engine will be displayed together with the datatype.
Types of Facets
There are two types of facets:
- Terms: displayed in the Doofinder layer as a list of terms/categories. This has an icon representing a list next to the field.
- Ranges: displayed as numeric range sliders. Represented by a small range selector. Note that only numeric fields will be displayed as range sliders.
Not all fields are good for filtering.
For example, a field that stores product references is not good because it’s very difficult to find a set of items sharing the same reference, and you would get a long list of filter references. However, brands, colours, sizes and genres are good options to filter.
What are those categories and best_price fields? They are not in my data feed…
When Doofinder processes your data feed, it transforms the product type field (or the google product category) and optimises it as categories. Hence Doofinder needs to create that field for you.
The same happens with the best price field. In the data feed, you can submit a regular price and a sale price, but when you filter results, you usually want to filter by the current price, and it can be the regular price or the sale price. Doofinder will require the price in a single field to make the filtering, hence why the best_price field exists.
Once you’ve selected some fields, you can edit the filter label that will be used in the Doofinder layer. You can also sort the facets. Just click, drag and drop. Then hit the Save button.
When will the facets appear in the Doofinder Layer?
Layer options served from Doofinder are not intended to be constantly changing, and they’re cached to improve performance. Depending on your users’ browser, it may take up to 1 hour to be up to date on their computers. This should not worry you.
If you’re developing some changes that you want to test immediately, you can disable your browser’s cache. For instance, Chrome lets you do this from the Network tab in the Dev Tools by enabling Disable Cache. That will take effect only while the Dev Tools panel is open.
Bare in mind that you can only add up to 10 fields in the facets. This will help maintain the speed of the search function.
Also, facets are sorted by the number of products with the highest number at the top. If you prefer to order them differently, say by size, colour and so on, you can follow the directions given here. Note that you will require some programming experience to make the changes.
Should you encounter any problems, please contact firstname.lastname@example.org
Last Updated: July 2021