1

I'm looking into ongr.io's ElasticSearchBundle but can't find a way to perform a multi index search or query. Am I overlooking something or is it just not possible (yet)?

According to the docs, you specify the index you're using in your configuration and not when performing the search..

Tieme
  • 62,602
  • 20
  • 102
  • 156

1 Answers1

1

You can create a separate manager for the multi-index search purpose and define index name separated by the comma.

connections:
    default:
        hosts:
            - 127.0.0.1:9200
        index_name: "firstIndex,secondIndex"
saimaz
  • 301
  • 1
  • 2
  • 8
  • Cool. And would that work easily or would there be any downsides to doing this? – Tieme Oct 13 '16 at 08:46
  • This is the flexibility of elasticsearch database. In ElasticsearchBundle I would recommend to create a separate manager for multi-index search, otherwise if you will try to write operation it will create documents in both index or throw an exception if something will be wrong with config etc. – saimaz Oct 14 '16 at 14:05