Partage
  • Partager sur Facebook
  • Partager sur Twitter

ElasticSearch Symfony 4.3

    19 décembre 2019 à 15:26:41

    Bonjour,

    j'essaie de suivre le tuto 

    https://hugo-soltys.com/blog/autocomplete-search-with-elasticsearch-and-symfony-4

    pour installer elasticsearch sur mon projet mais a la config de fos_elastica.yml j'ai eu erreur au 

    fos:elastica:populate


      Root mapping definition has unsupported parameters:  [job : {dynamic_date_formats=[], properties={name={search_analyze  
      r=keyword_analyzer, analyzer=keyword_analyzer, type=text}}}] [reason: Failed to parse mapping [_doc]: Root mapping def  
      inition has unsupported parameters:  [job : {dynamic_date_formats=[], properties={name={search_analyzer=keyword_analyz  
      er, analyzer=keyword_analyzer, type=text}}}]]     


    fos_elastica.yml


    # Read the documentation: https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Resources/doc/setup.md
    fos_elastica:
        clients:
            default: { url: '%env(ELASTICSEARCH_URL)%' }
        indexes:
            app: # the name of our index
                settings:
                    index:
                        analysis:
                            analyzer:
                                keyword_analyzer: # this is a custom analyzer, see the explanations below
                                    type: custom
                                    tokenizer: standard
                                    filter: [standard, lowercase, asciifolding, trim]
                types:
                    job: # the name of our type
                        properties:
                            name:
                                analyzer: keyword_analyzer
                                search_analyzer: keyword_analyzer
                                type: text
                        persistence:
                            driver: orm
                            model: App\Entity\Job
                            provider: ~
                            finder: ~


    Pourtant si je met que l'indexe App sans type et que je fais un create tout est ok.


    Si quelqu'un à une idée je suis preneur :)



    • Partager sur Facebook
    • Partager sur Twitter
      16 septembre 2020 à 12:40:03

      Salut,

      j'ai exactement le même soucis que toi en ce moment, impossible de trouver un bon exemple de fichier config avec la bonne syntaxe...

      Elastic 7.2, as tu trouvé réponse à ton problème ? Merci

      • Partager sur Facebook
      • Partager sur Twitter

      ElasticSearch Symfony 4.3

      × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
      × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
      • Editeur
      • Markdown