Created
December 19, 2018 13:45
-
-
Save nunomaduro/2de2a6f7628a6630d64373b33c45f760 to your computer and use it in GitHub Desktop.
Scout Extended Settings File
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
<?php | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Searchable Attributes | |
|-------------------------------------------------------------------------- | |
| | |
| Limits the scope of a search to the attributes listed in this setting. Defining | |
| specific attributes as searchable is critical for relevance because it gives | |
| you direct control over what information the search engine should look at. | |
| | |
| Supported: Null, Array | |
| Example: ["name", "ordered(email)", "unordered(city)"] | |
| | |
*/ | |
'searchableAttributes' => ['subject', 'body', 'slug', 'author_name', 'author_email'], | |
/* | |
|-------------------------------------------------------------------------- | |
| Custom Ranking | |
|-------------------------------------------------------------------------- | |
| | |
| Custom Ranking is about leveraging business metrics to rank search | |
| results - it's crucial for any successful search experience. Make sure that | |
| only "numeric" attributes are used, such as the number of sales or views. | |
| | |
| Supported: Null, Array | |
| Examples: ['desc(comments_count)', 'desc(views_count)'] | |
| | |
*/ | |
'customRanking' => ['asc(sales_count)', 'desc(views_count)', 'desc(created_at)'], | |
// ... | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment