jolicode / elastically

🔍 JoliCode's Elastica wrapper to bootstrap Elasticsearch PHP integrations
248 stars 37 forks source link

Accept more flexible client configuration by declaring it as variable #132

Closed Korbeil closed 1 year ago

Korbeil commented 1 year ago

This will allow us to do stuff as following:

# config/packages/elastically.yaml
elastically:
    connections:
        default:
            client: '%env(json:ELASTICSEARCH_CONFIG)%'
            mapping_directory: '%kernel.project_dir%/config/elasticsearch'

            index_class_mapping:
                my-foobar-index:     App\Dto\Foobar

With ELASTICSEARCH_CONFIG='{ "host": "elasticsearch", "port": 9200, "timeout": 4, "persistent": true }'

lyrixx commented 1 year ago

Thanks