-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
152 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
<?php | ||
|
||
return [ | ||
// TODO: This configuration is a bit lonely here, | ||
// maybe we can move this to Scout later? | ||
// Which product visibilities should be indexed? | ||
// VISIBILITY_NOT_VISIBLE = 1 | ||
// VISIBILITY_IN_CATALOG = 2 | ||
// VISIBILITY_IN_SEARCH = 3 | ||
// VISIBILITY_BOTH = 4 | ||
'visibility' => [2, 3, 4], | ||
|
||
// Additional searchable attributes with the search weight. | ||
'searchable' => [ | ||
// 'attribute' => 4.0, | ||
], | ||
|
||
// From Magento only "Yes/No, Dropdown, Multiple Select and Price" attribute types | ||
// can be configured as filter. If you'd like to have a filter for an attribute | ||
// with, for example, the type of "Text", you can specify the attribute_code here. | ||
'additional_filters' => [ | ||
// eav_attribute attribute_code. e.g. brand | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
// See: https://www.searchkit.co/docs/api-documentation/searchkit#search_settings-configuration | ||
return [ | ||
// Attributes that are used to highlight the search results. | ||
'highlight_attributes' => [ | ||
// 'name', | ||
], | ||
|
||
// Attributes that are used to search the results. | ||
// This will be merged with the searchable | ||
// attributes configured in Magento. | ||
'search_attributes' => [ | ||
// ['field' => 'attribute_code', 'weight' => 4.0], | ||
], | ||
|
||
// Attributes that are returned in the search result response. | ||
// Don't want to keep track of this? An empty array will | ||
// return all attributes, but that's not recommended! | ||
'result_attributes' => [ | ||
'entity_id', | ||
'name', | ||
'sku', | ||
'price', | ||
'special_price', | ||
'image', | ||
'images', | ||
'url', | ||
'thumbnail', | ||
'in_stock', | ||
'children', | ||
'super_*', | ||
'reviews_count', | ||
'reviews_score', | ||
], | ||
|
||
// Attributes that are used to create facets. | ||
// From Magento only "Yes/No, Dropdown, Multiple Select and Price" attribute types | ||
// can be configured as filter. If you'd like to have a filter for an attribute | ||
// with, for example, the type of "Text", you can specify the attribute_code here. | ||
'facet_attributes' => [ | ||
// ['attribute' => 'brand', 'field' => 'brand.keyword', 'type' => 'string'], | ||
], | ||
|
||
// Attributes that are used to create filters. | ||
// TODO: Do we really need this? With ReactiveSearch | ||
// we didn't need to keep a list to filter. | ||
'filter_attributes' => [ | ||
['attribute' => 'entity_id', 'field' => 'entity_id', 'type' => 'numeric'], | ||
['attribute' => 'category_ids', 'field' => 'category_ids', 'type' => 'numeric'], | ||
['attribute' => 'visibility', 'field' => 'visibility', 'type' => 'numeric'], | ||
], | ||
|
||
// TODO: Sorting... | ||
// 'sorting' => [] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters