Search code examples
elasticsearchmulti-index

Elasticsearch msearch


I want to submit 2 search requests to ES at the same time, one for a standard multi-match query to one index and the other being a more_like_this query to a different index. I'm aware of the msearch and just discovered the Multi Index, Multi Type with Multi Index Syntax.

They both seem kind of one in the same... and I'm not sure which one to use for my purposes? Does anyone have additional information or best practice advice on them?


Solution

  • They are not the same. msearch give you the ability to send multiple search request to ES, each request can be search in one index or in multiple indexes or types.

    In msearch you can submit multiple search request each request with total different query's. In Mindex you can sumbit only one query