Skip to content

Commit

Permalink
Update setup.md (#1525)
Browse files Browse the repository at this point in the history
Add info about how to create more than one type for Elasticsearch 6.x
  • Loading branch information
Tarasovych authored and XWB committed May 29, 2019
1 parent a8c4c75 commit 6dad59d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/setup.md
Expand Up @@ -105,6 +105,26 @@ fos_elastica:
Each defined type is made available as a service, and in this case the service key is
`fos_elastica.index.app.user` and is an instance of `Elastica\Type`.

If you are using Elasticsearch 6.x, you have to create separate index for each type:
```yaml
fos_elastica:
indexes:
app_user:
types:
user:
properties:
username: ~
firstName: ~
lastName: ~
email: ~
app_post:
types:
post:
properties:
title: ~
content: ~
```

FOSElasticaBundle requires a provider for each type that will notify when an object
that maps to a type has been modified. The bundle ships with support for Doctrine objects.

Expand Down

0 comments on commit 6dad59d

Please sign in to comment.