Skip to content

Commit

Permalink
Update doc with new way to add fields to search
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Oct 10, 2023
1 parent ea58162 commit 0627f6a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/add_custom_values.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ You will have the `item.short_description` variable available in your templates.
## Search on the custom value

With only the decorator, you will not be able to search in the content of the new field.
You have to redeclare `monsieurbiz.search.request.query_filter.product_search.search_term_filter`
and `monsieurbiz.search.request.query_filter.product_instant_search.search_term_filter` services
to add the `short_description` fields.
You have to change parameters to define the fields to search for the search page and the instant search.

- [Add `short_description` in search term filter](../dist/src/Resources/config/services.yaml#L34)
- [Add `short_description` in `monsieurbiz.search.product.search.fields_to_search`](../dist/src/Resources/config/config.yaml#6)
- [Add `short_description` in `monsieurbiz.search.product.instant.fields_to_search`](../dist/src/Resources/config/config.yaml#13)

0 comments on commit 0627f6a

Please sign in to comment.