Я использую Symfony с пакетом Fosastica. Я пытаюсь добавить сопоставления, как в этом уроке https://www.codevate.com/blog/14-implementing-search-as-you-type-autocomplete-with-elasticsearch-and-symfony, но получил эту ошибку:
Unrecognized option "mappings" under "fos_elastica.indexes.app.types.user"
это мой конфиг:
# Read the documentation: https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Resources/doc/setup.md
fos_elastica:
clients:
default: { host: localhost, port: 9200 }
# indexes:
# app: ~
indexes:
app:
client: default
settings:
index:
analysis:
analyzer:
name_analyzer:
type: custom
tokenizer: standard
filter: [standard, lowercase, asciifolding, elision]
types:
user:
properties:
username: ~
# mappings:
# email: ~
mappings:
username:
type: completion
analyzer: name_analyzer
search_analyzer: name_analyzer
payloads: true
persistence:
# the driver can be orm, mongodb, phpcr or propel
# listener and finder are not supported by
# propel and should be removed
driver: orm
model: App\Entity\User
provider: ~
listener: ~
finder: ~