I am new to scala, using alpakka-elasticsearch client to perform query with elastic search.
Single search query is working fine with below two ways which internally calls to _search url of elastic search:
val writeCustomIndex = ElasticsearchSource
.typed[Book](
indexName = "source",
typeName = "_doc",
query = """{"match_all": {}}"""
)
OR
val readWithSearchParameters = ElasticsearchSource
.typed[TestDoc](
indexName,
Some(typeName),
searchParams = Map(
"query" -> """ {"match_all": {}} """,
"_source" -> """ ["id", "a", "c"] """
)
What I am looking for is to perform below multi query(_msearch) with this client.
url - http://localhost:9200/index1/_msearch?
request :
[
{"query" : {"match_all" : {}}, "from" : 0, "size" : 1},
{"index" : "index2"},
{"query" : {"match_all" : {}}, "from" : 0, "size" : 2}
]
elastic client source : https://doc.akka.io/docs/alpakka/current/elasticsearch.html