You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next, set the `default` option in your application's `config/mail.php` configuration file to `mailgun` and add the following configuration array to your array of `mailers`:
62
+
Next, you will need to make two changes in your application's `config/mail.php` configuration file. First, set your default mailer to `mailgun`:
63
+
64
+
'default' => env('MAIL_MAILER', 'mailgun'),
65
+
66
+
Second, add the following configuration array to your array of `mailers`:
Copy file name to clipboardExpand all lines: original-en/scout.md
+52-9
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,7 @@ For more information regarding Meilisearch, please consult the [Meilisearch docu
123
123
124
124
In addition, you should ensure that you install a version of `meilisearch/meilisearch-php` that is compatible with your Meilisearch binary version by reviewing [Meilisearch's documentation regarding binary compatibility](https://github.com/meilisearch/meilisearch-php#-compatibility-with-meilisearch).
125
125
126
-
> [!WARNING]
126
+
> [!WARNING]
127
127
> When upgrading Scout on an application that utilizes Meilisearch, you should always [review any additional breaking changes](https://github.com/meilisearch/Meilisearch/releases) to the Meilisearch service itself.
128
128
129
129
<aname="typesense"></a>
@@ -281,6 +281,49 @@ Some search engines such as Meilisearch will only perform filter operations (`>`
281
281
];
282
282
}
283
283
284
+
<aname="configuring-indexes-for-algolia"></a>
285
+
#### Configuring Index Settings (Algolia)
286
+
287
+
Sometimes you may want to configure additional settings on your Algolia indexes. While you can manage these settings via the Algolia UI, it is sometimes more efficient to manage the desired state of your index configuration directly from your application's `config/scout.php` configuration file.
288
+
289
+
This approach allows you to deploy these settings through your application's automated deployment pipeline, avoiding manual configuration and ensuring consistency across multiple environments. You may configure filterable attributes, ranking, faceting, or [any other supported settings](https://www.algolia.com/doc/rest-api/search/#tag/Indices/operation/setSettings).
290
+
291
+
To get started, add settings for each index in your application's `config/scout.php` configuration file:
If the model underlying a given index is soft deletable and is included in the `index-settings` array, Scout will automatically include support for faceting on soft deleted models on that index. If you have no other faceting attributes to define for a soft deletable model index, you may simply add an empty entry to the `index-settings` array for that model:
314
+
315
+
```php
316
+
'index-settings' => [
317
+
Flight::class => []
318
+
],
319
+
```
320
+
321
+
After configuring your application's index settings, you must invoke the `scout:sync-index-settings` Artisan command. This command will inform Algolia of your currently configured index settings. For convenience, you may wish to make this command part of your deployment process:
#### Configuring Filterable Data and Index Settings (Meilisearch)
286
329
@@ -400,7 +443,7 @@ Enabling this feature will also pass the request's IP address and your authentic
400
443
<aname="database-engine"></a>
401
444
### Database Engine
402
445
403
-
> [!WARNING]
446
+
> [!WARNING]
404
447
> The database engine currently supports MySQL and PostgreSQL.
405
448
406
449
If your application interacts with small to medium sized databases or has a light workload, you may find it more convenient to get started with Scout's "database" engine. The database engine will use "where like" clauses and full text indexes when filtering results from your existing database to determine the applicable search results for your query.
@@ -441,7 +484,7 @@ public function toSearchableArray(): array
441
484
}
442
485
```
443
486
444
-
> [!WARNING]
487
+
> [!WARNING]
445
488
> Before specifying that a column should use full text query constraints, ensure that the column has been assigned a [full text index](/docs/{{version}}/migrations#available-index-types).
446
489
447
490
<aname="collection-engine"></a>
@@ -496,7 +539,7 @@ If you would like to modify the query that is used to retrieve all of your model
496
539
return $query->with('author');
497
540
}
498
541
499
-
> [!WARNING]
542
+
> [!WARNING]
500
543
> The `makeAllSearchableUsing` method may not be applicable when using a queue to batch import models. Relationships are [not restored](/docs/{{version}}/queues#handling-relationships) when model collections are processed by jobs.
501
544
502
545
<aname="adding-records"></a>
@@ -529,7 +572,7 @@ Or, if you already have a collection of Eloquent models in memory, you may call
529
572
530
573
$orders->searchable();
531
574
532
-
> [!NOTE]
575
+
> [!NOTE]
533
576
> The `searchable` method can be considered an "upsert" operation. In other words, if the model record is already in your index, it will be updated. If it does not exist in the search index, it will be added to the index.
534
577
535
578
<aname="updating-records"></a>
@@ -625,7 +668,7 @@ Sometimes you may need to only make a model searchable under certain conditions.
625
668
626
669
The `shouldBeSearchable` method is only applied when manipulating models through the `save` and `create` methods, queries, or relationships. Directly making models or collections searchable using the `searchable` method will override the result of the `shouldBeSearchable` method.
627
670
628
-
> [!WARNING]
671
+
> [!WARNING]
629
672
> The `shouldBeSearchable` method is not applicable when using Scout's "database" engine, as all searchable data is always stored in the database. To achieve similar behavior when using the database engine, you should use [where clauses](#where-clauses) instead.
630
673
631
674
<aname="searching"></a>
@@ -682,7 +725,7 @@ The `whereNotIn` method verifies that the given column's value is not contained
682
725
683
726
Since a search index is not a relational database, more advanced "where" clauses are not currently supported.
684
727
685
-
> [!WARNING]
728
+
> [!WARNING]
686
729
> If your application is using Meilisearch, you must configure your application's [filterable attributes](#configuring-filterable-data-for-meilisearch) before utilizing Scout's "where" clauses.
687
730
688
731
<aname="pagination"></a>
@@ -719,7 +762,7 @@ Of course, if you would like to retrieve the pagination results as JSON, you may
> Since search engines are not aware of your Eloquent model's global scope definitions, you should not utilize global scopes in applications that utilize Scout pagination. Or, you should recreate the global scope's constraints when searching via Scout.
724
767
725
768
<aname="soft-deleting"></a>
@@ -739,7 +782,7 @@ When this configuration option is `true`, Scout will not remove soft deleted mod
739
782
// Only include trashed records when retrieving results...
0 commit comments