Skip to content

Commit f2e4926

Browse files
committed
2025-02-10までの原文変更点反映。
1 parent 070e885 commit f2e4926

File tree

6 files changed

+105
-13
lines changed

6 files changed

+105
-13
lines changed

Diff for: original-en/mail.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ To use the Mailgun driver, install Symfony's Mailgun Mailer transport via Compos
5959
composer require symfony/mailgun-mailer symfony/http-client
6060
```
6161

62-
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`:
6367

6468
'mailgun' => [
6569
'transport' => 'mailgun',

Diff for: original-en/migrations.md

-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ The schema builder blueprint offers a variety of methods that correspond to the
416416
[string](#column-method-string)
417417
[text](#column-method-text)
418418
[tinyText](#column-method-tinyText)
419-
[longText](#column-method-longText)
420419

421420
</div>
422421

Diff for: original-en/scout.md

+52-9
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ For more information regarding Meilisearch, please consult the [Meilisearch docu
123123

124124
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).
125125

126-
> [!WARNING]
126+
> [!WARNING]
127127
> 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.
128128
129129
<a name="typesense"></a>
@@ -281,6 +281,49 @@ Some search engines such as Meilisearch will only perform filter operations (`>`
281281
];
282282
}
283283

284+
<a name="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:
292+
293+
```php
294+
use App\Models\User;
295+
use App\Models\Flight;
296+
297+
'algolia' => [
298+
'id' => env('ALGOLIA_APP_ID', ''),
299+
'secret' => env('ALGOLIA_SECRET', ''),
300+
'index-settings' => [
301+
User::class => [
302+
'searchableAttributes' => ['id', 'name', 'email'],
303+
'attributesForFaceting'=> ['filterOnly(email)'],
304+
// Other settings fields...
305+
],
306+
Flight::class => [
307+
'searchableAttributes'=> ['id', 'destination'],
308+
],
309+
],
310+
],
311+
```
312+
313+
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:
322+
323+
```shell
324+
php artisan scout:sync-index-settings
325+
```
326+
284327
<a name="configuring-filterable-data-for-meilisearch"></a>
285328
#### Configuring Filterable Data and Index Settings (Meilisearch)
286329

@@ -400,7 +443,7 @@ Enabling this feature will also pass the request's IP address and your authentic
400443
<a name="database-engine"></a>
401444
### Database Engine
402445

403-
> [!WARNING]
446+
> [!WARNING]
404447
> The database engine currently supports MySQL and PostgreSQL.
405448
406449
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
441484
}
442485
```
443486

444-
> [!WARNING]
487+
> [!WARNING]
445488
> 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).
446489
447490
<a name="collection-engine"></a>
@@ -496,7 +539,7 @@ If you would like to modify the query that is used to retrieve all of your model
496539
return $query->with('author');
497540
}
498541

499-
> [!WARNING]
542+
> [!WARNING]
500543
> 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.
501544
502545
<a name="adding-records"></a>
@@ -529,7 +572,7 @@ Or, if you already have a collection of Eloquent models in memory, you may call
529572

530573
$orders->searchable();
531574

532-
> [!NOTE]
575+
> [!NOTE]
533576
> 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.
534577
535578
<a name="updating-records"></a>
@@ -625,7 +668,7 @@ Sometimes you may need to only make a model searchable under certain conditions.
625668

626669
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.
627670

628-
> [!WARNING]
671+
> [!WARNING]
629672
> 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.
630673
631674
<a name="searching"></a>
@@ -682,7 +725,7 @@ The `whereNotIn` method verifies that the given column's value is not contained
682725

683726
Since a search index is not a relational database, more advanced "where" clauses are not currently supported.
684727

685-
> [!WARNING]
728+
> [!WARNING]
686729
> 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.
687730
688731
<a name="pagination"></a>
@@ -719,7 +762,7 @@ Of course, if you would like to retrieve the pagination results as JSON, you may
719762
return Order::search($request->input('query'))->paginate(15);
720763
});
721764

722-
> [!WARNING]
765+
> [!WARNING]
723766
> 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.
724767
725768
<a name="soft-deleting"></a>
@@ -739,7 +782,7 @@ When this configuration option is `true`, Scout will not remove soft deleted mod
739782
// Only include trashed records when retrieving results...
740783
$orders = Order::search('Star Trek')->onlyTrashed()->get();
741784

742-
> [!NOTE]
785+
> [!NOTE]
743786
> When a soft deleted model is permanently deleted using `forceDelete`, Scout will remove it from the search index automatically.
744787
745788
<a name="customizing-engine-searches"></a>

Diff for: translation-ja/mail.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ Mailgunドライバを使用する場合は、Composerで、SymfonyのMailgun Ma
5959
composer require symfony/mailgun-mailer symfony/http-client
6060
```
6161

62-
次に、アプリケーションの`config/mail.php`設定ファイルの`default`オプションを`mailgun`へ設定し、次の設定配列を`mailers`設定配列へ追加します:
62+
次に、アプリケーションの`config/mail.php`設定ファイルへ、2つの変更を加える必要があります。まず、デフォルトのメーラーを`mailgun`に設定します。
63+
64+
'default' => env('MAIL_MAILER', 'mailgun'),
65+
66+
それから、以下の設定配列を`mailers`配列へ追加します。
6367

6468
'mailgun' => [
6569
'transport' => 'mailgun',

Diff for: translation-ja/migrations.md

-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ php artisan migrate:fresh --database=admin
416416
[string](#column-method-string)
417417
[text](#column-method-text)
418418
[tinyText](#column-method-tinyText)
419-
[longText](#column-method-longText)
420419

421420
</div>
422421

Diff for: translation-ja/scout.md

+43
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,49 @@ Meilisearchなどの検索エンジンでは、正しい型のデータに対し
281281
];
282282
}
283283

284+
<a name="configuring-indexes-for-algolia"></a>
285+
#### インデックス構成の設定(Algolia)
286+
287+
Algoliaのインデックスへ設定を追加したい場合もあるでしょう。これらの設定はAlgoliaのUIから管理できますが、アプリケーションの`config/scout.php`設定ファイルで直接インデックス設定の望ましい状態を管理する方が効率的な場合もあります。
288+
289+
このアプローチにより、アプリケーションの自動デプロイパイプラインを通じて、これらの設定をデプロイできるようになります。手作業による設定を回避し、複数の環境間での一貫性を確保できます。フィルタリング可能な属性、ランキング、ファセット、もしくは[サポート済みのその他の設定](https://www.algolia.com/doc/rest-api/search/#tag/Indices/operation/setSettings)を設定可能です。
290+
291+
これを始めるには、アプリケーションの`config/scout.php`設定ファイルへ各インデックスの設定を追加します。
292+
293+
```php
294+
use App\Models\User;
295+
use App\Models\Flight;
296+
297+
'algolia' => [
298+
'id' => env('ALGOLIA_APP_ID', ''),
299+
'secret' => env('ALGOLIA_SECRET', ''),
300+
'index-settings' => [
301+
User::class => [
302+
'searchableAttributes' => ['id', 'name', 'email'],
303+
'attributesForFaceting'=> ['filterOnly(email)'],
304+
// その他の設定項目…
305+
],
306+
Flight::class => [
307+
'searchableAttributes'=> ['id', 'destination'],
308+
],
309+
],
310+
],
311+
```
312+
313+
指定するインデックスの元となるモデルが、ソフトデリート可能で、`index-settings`配列に含まれている場合、Scoutはそのインデックスのソフトデリート済みモデルに対するファセットを自動的にサポートします。ソフトデリート可能なモデルインデックスに対し定義するファセット属性が他にない場合は、そのモデルに対して`index-settings`配列に空のエントリを追加するだけです。
314+
315+
```php
316+
'index-settings' => [
317+
Flight::class => []
318+
],
319+
```
320+
321+
アプリケーションのインデックス設定を行った後は、`scout:sync-index-settings` Artisanコマンドを起動する必要があります。このコマンドは現在設定しているインデックス設定をAlgoliaへ通知します。このコマンドをデプロイプロセスの一部とすると便利でしょう。
322+
323+
```shell
324+
php artisan scout:sync-index-settings
325+
```
326+
284327
<a name="configuring-filterable-data-for-meilisearch"></a>
285328
#### Filterableデータとインデックス(Meilisearch)の設定
286329

0 commit comments

Comments
 (0)