Run a Composition

Runs a query on a single composition and returns matching results.

Usage

Required ACL: search
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import algoliasearch.api.CompositionClient
import algoliasearch.config.*

val client = CompositionClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY")

val response = Await.result(
  client.search(
    compositionID = "foo",
    requestBody = RequestBody(
      params = Some(
        Params(
          query = Some("batman")
        )
      )
    )
  ),
  Duration(100, "sec")
)
Did you find this page helpful?