In our example we will add the short_description
product field to the indexed content.
- Add your elasticsearch config path in
monsieurbiz_sylius_search.elastically_configuration_paths
- Extends the product mapping to add the field
- Add a decorator for ProductMapperConfiguration
- Create DecorateProductMapperConfiguration class
You will have the item.short_description
variable available in your templates.
With only the decorator, you will not be able to search in the content of the new field. You have to change parameters to define the fields to search for the search page and the instant search.