Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit 6214ac2

Browse files
committed
Updated README
1 parent b8aa6bb commit 6214ac2

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ Use composer to install the package:
5555
composer require babenkoivan/scout-elasticsearch-driver
5656
```
5757

58+
If you are using Laravel version <= 5.4 or [the package discovery](https://laravel.com/docs/5.5/packages#package-discovery)
59+
is disabled, add the following providers in `config/app.php`:
60+
61+
```php
62+
'providers' => [
63+
Laravel\Scout\ScoutServiceProvider::class,
64+
ScoutElastic\ScoutElasticServiceProvider::class,
65+
]
66+
```
67+
5868
## Configuration
5969

6070
To configure the package you need to publish settings first:
@@ -122,6 +132,12 @@ To create an index just run the artisan command:
122132
php artisan elastic:create-index App\\MyIndexConfigurator
123133
```
124134

135+
Note, that every searchable model requires its own index configurator.
136+
137+
> Indices created in Elasticsearch 6.0.0 or later may only contain a single mapping type. Indices created in 5.x with multiple mapping types will continue to function as before in Elasticsearch 6.x. Mapping types will be completely removed in Elasticsearch 7.0.0.
138+
139+
You can find more information [here](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html).
140+
125141
## Searchable model
126142

127143
To create a model with the ability to perform search requests in an Elasticsearch index use the command:
@@ -157,8 +173,7 @@ class MyModel extends Model
157173
'type' => 'text',
158174
'fields' => [
159175
'raw' => [
160-
'type' => 'text',
161-
'index' => 'not_analyzed',
176+
'type' => 'keyword',
162177
]
163178
]
164179
],

0 commit comments

Comments
 (0)