1
votes

I get the following error when populating elastic search:

  Root mapping definition has unsupported parameters:  [product : {dynamic_date_formats=[], _meta={model=App\Entity\Product}, properties={name={type=text}, description={type=text}}}] [reason: Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [product : {
  dynamic_date_formats=[], _meta={model=App\Entity\Product}, properties={name={type=text}, description={type=text}}}]]

Basically, I followed only the documentation ( https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/doc/setup.md ) and changed userto product and the corresponding fields in my App\Entity\Product.

fos_elastica.yaml:

fos_elastica:
  clients:
    default: { host: localhost, port: 9200 }
  indexes:
    app:
      types:
        product:
          properties:
            name: ~
            description: ~
          persistence:
            driver: orm
            model: App\Entity\Product
            provider: ~
            finder: ~
1
Did you find a solution ?jean-max

1 Answers

1
votes

Are you using Elasticsearch version 7? I had the same problem today and think that it is related to the Elasticsearch version you are using. If I install Elasticsearch version 6, everything is working fine. I'm not an Elasticsearch expert, but there are probably some breaking changes in version 7 with which FOSElasticaBundle is not yet compatible.