diff --git a/.wordlist.txt b/.wordlist.txt index e68cd65a7..6fafc4444 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -1749,6 +1749,7 @@ scss sdk searchMedia searchViaAdminApi +searchability secretKey selectable selectbox diff --git a/guides/plugins/plugins/framework/custom-field/add-custom-field.md b/guides/plugins/plugins/framework/custom-field/add-custom-field.md index 5d03bcf7e..f2582d120 100644 --- a/guides/plugins/plugins/framework/custom-field/add-custom-field.md +++ b/guides/plugins/plugins/framework/custom-field/add-custom-field.md @@ -257,6 +257,7 @@ $this->customFieldSetRepository->create([ [ 'name' => 'swag_example_size', 'type' => CustomFieldTypes::INT, + 'searchable' => true, 'config' => [ 'label' => [ 'en-GB' => 'English custom field label', @@ -277,6 +278,14 @@ The translated labels are added to both the field and the set, which are going t If you have several custom fields and want to order them within a specific order, you can do so with the `customFieldPosition` property. +::: info + Available starting with Shopware 6.7.6.0. +::: + +By default, custom fields are **not searchable**. To make a custom field searchable, you need to set the `searchable` property to `true` when creating the custom field. Only custom fields explicitly marked as searchable are available in search configurations. This helps optimize index storage size and improve search performance, especially for stores with many custom fields. + +If you enable searchability for an existing product custom field, you must rebuild the search index or update the products manually to include the custom field data in search results. + ::: info If you want the custom field set to be deletable and editable in the administration, you need to set global to false :::