ongr-io / ElasticsearchBundle

Symfony bundle for Elasticsearch with steroids
MIT License
313 stars 189 forks source link

Support multiple indexes by introducing MultiIndexService #791

Open andywooyay opened 7 years ago

andywooyay commented 7 years ago

In the manager configuration we expect the index name to be a string. In the ES docs this can be comma separated, or use wildcards. (See https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-index.html)

Currently you can set your index name to index1,index2 and it will work for read operations, but when you attempt to create those indexes it will fail.

I started changing the code to support array syntax in the configuration, and then comma separate them for read operations and run separate commands for write operations. Is this something worth continuing?

saimaz commented 5 years ago

I want to introduce this feature in V6. Since the types are removed it will support only indexes (with 1 type if necessary) and the manager will be replaced with IndexService. To support multiple indexes I will introduce later MultiIndecService to allow execute search queries in multiple indexes.