Skip to content

Commit 6dad59d

Browse files
TarasovychXWB
authored andcommitted
Update setup.md (#1525)
Add info about how to create more than one type for Elasticsearch 6.x
1 parent a8c4c75 commit 6dad59d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/setup.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,26 @@ fos_elastica:
105105
Each defined type is made available as a service, and in this case the service key is
106106
`fos_elastica.index.app.user` and is an instance of `Elastica\Type`.
107107

108+
If you are using Elasticsearch 6.x, you have to create separate index for each type:
109+
```yaml
110+
fos_elastica:
111+
indexes:
112+
app_user:
113+
types:
114+
user:
115+
properties:
116+
username: ~
117+
firstName: ~
118+
lastName: ~
119+
email: ~
120+
app_post:
121+
types:
122+
post:
123+
properties:
124+
title: ~
125+
content: ~
126+
```
127+
108128
FOSElasticaBundle requires a provider for each type that will notify when an object
109129
that maps to a type has been modified. The bundle ships with support for Doctrine objects.
110130

0 commit comments

Comments
 (0)