Tirexs v0.8.15 Tirexs.MultiGet

Multi GET API allows to get multiple documents based on an index, type (optional) and id (and possibly routing).

A mget macro helps create a request body.

Getting multiple documents by their id:

request = mget do
  ids([ 1, 2 ])
end
Tirexs.bump(request)._mget("bear_test", "my_type")

Getting multiple documents:

request = mget do
  docs([
    [ index: "bear_test", type: "bear_type", id: 1, fields: [] ],
    [ index: "bear_test", type: "bear_type", id: 2, source: false ]
  ])
end
Tirexs.bump(request)._mget()

Summary

Functions

gets multiple documents

gets multiple documents by their id

Macros

A mget macro helps create a request body

Functions

docs(list)

gets multiple documents.

ids(list)

gets multiple documents by their id.

Macros

mget(list)

A mget macro helps create a request body.