Attribute configuration - romainruaud/elasticsuite GitHub Wiki
Each product attribute can be configured to be used in Search and/or Catalog Layered Navigation.
On the attribute edition page in Magento back-office (Store > Attributes > Product), following parameters can be modified on the Storefront Properties tab :
Parameter | Default value | Description |
---|---|---|
Use in Search | No | If the attribute is used for product search. Eg : Setting it to "Yes" for the "Color" attribute allows to obtain result when searching on "blue hoodie" or "red jacket". |
Search Weight | 1 | The weight of this attribute in search. |
Used in spellcheck | No | When set to "Yes", the engine will compute spellchecking (see Spellchecking) on this attribute values. |
Display in autocomplete | No | When set to "Yes", values of this attributes will be shown in autocomplete results. |
Visible in Advanced Search | No | If this attribute can be used on the Advanced Search page. |
Use in Layered Navigation | No | Set this to "Filterable (with results)" to display this attribute as a search filter (facet) on the Catalog Navigation pages. |
Use in Search Results Layered Navigation | No | Set this to "Yes" to display this attribute as a search filter (facet) on the Search Result pages. |
You can refer to the following section to enhance the faceting configuration.
Each product attribute can also be configured when it is used as a facet in the search results and/or category view page.
On the attribute edition page in Magento back-office, following parameters can be modified :
Parameter | Default value | Description |
---|---|---|
Facet coverage rate | 90 | The minimum coverage rates of results by this attribute. Example, if set to 90% on the "Brand" attribute, the facet will be displayed only if 90% of the products in the search results or category have a brand. |
Facet max. size | 10 | The maximum number of values that will be displayed for this facet. If the attribute features more values than this limit, a Show more button will be displayed after the values listing. |
Facet sort order | Result count | This is how the facet values will be ordered.
|
ElasticSuite allows you to display custom attributes of yours with Sliders (like the Price).
There are some prerequisites to respect for this point to work :
- your attribute values must be exclusively digits
- you must specify that your attribute is using "Decimal Number" as imput validation, or "price" as input type.
Let's see a quick how-to for a new attribute.
This attribute will be Temperature and we plan to display a slider of values in Celsius degrees.
Let's go to Stores > Product > Attributes and create a new One.
I call it "Temperature", set its code to "temperature" and the input as a text field.
Then I set the "Input validation" to "Decimal Number"
Next step is to configure the attribute for being filterable in layered navigation and/or in search. See the steps describe above to perform this.
Once you are done, you can click on Save and Continue Edit and go back to the StoreFront properties.
You will then see a new fieldset named Slider Display Configuration
In this fieldset you can configure the display of your newly created attribute :
Parameter | Default value | Description |
---|---|---|
Display pattern | In this field you should enter the pattern for your Slider. "%s" represents the value. So if you type "%s °C" you will obtain something like : "20 °C". | |
Display precision | 0 | The number of digits to show for precision when filtering. Let this field to 0 to have a slider displaying integer values. |
Once you are done, you can now populate this attribute values for your products. Then all you will have to do is to process a full reindex.
The slider should now be displayed in the Front-Office :