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
Copy file name to clipboardExpand all lines: README.md
+15-7Lines changed: 15 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
1
# Laravel Scout Settings
2
2
3
-
Import/Export Algolia settingsinto your Laravel Scout project.
3
+
**Import/Export Algolia settings, synonyms and query rules into your Laravel Scout project.**
4
4
5
5
The easiest way to manage your settings is usually to go to your Algolia dashboard because it has a nice UI and you can test the relevancy directly there.
6
6
7
7
Once you fine tuned your configuration, you may want to add it to your project.
8
8
9
9
This package adds two Laravel commands to your project:
10
10
11
-
- one to save your settings into a JSON file
12
-
- one to push them back to Algolia
11
+
- one to save your settings, synonyms and query rules into JSON files
12
+
- one to push everything back to Algolia
13
13
14
14
This has 3 majors advantages:
15
15
16
16
1. You can version your configuration with your VCS
17
-
2. You can set up a new environement or restore backups easily
17
+
2. You can set up a new environment or restore backups easily
18
18
3. It lets you customize your settings in JSON format before pushing them
19
19
20
20
## Install
@@ -44,19 +44,23 @@ You will now get two new commands available in `artisan`. They both take a model
44
44
45
45
The following example assume you have an `App\Contact` class, which uses the `Searchable` trait.
46
46
47
-
Note: Scout allows you to customize the index name with the [`searchableAs()`](https://laravel.com/docs/5.4/scout#configuring-model-indexes) method. This package will follow this naming convention.
47
+
Note: Scout allows you to customize the index name with the [`searchableAs()`](https://laravel.com/docs/scout#configuring-model-indexes) method. This package will follow this naming convention.
48
48
49
49
### Backing up settings (Project ⬅️ Algolia)
50
50
51
-
The following command will export all the settings and synonyms from the `App\Contact`'s index into the `resources/algolia-settings/prefix_index_name.json` and `resources/algolia-settings/prefix_index_name-synonyms.json` files.
51
+
The following command will export all the settings and synonyms from the `App\Contact`'s index into the following files:
The following command will read all the settingsand synonyms from the `resources/algolia-settings/prefix_index_name.json` and`resources/algolia-settings/prefix_index_name-synonyms.json` files. and import them into Algolia's index.
63
+
The following command will read all the settings, synonyms and query rules from the files in`resources/algolia-settings/` and import them into Algolia's index.
0 commit comments