yaml
type: "io.kestra.plugin.elasticsearch.Search"

Send a search request.

Get all documents from a search request and store it as outputs.

Examples

yaml
id: elasticsearch_search
namespace: company.team

tasks:
  - id: search
    type: io.kestra.plugin.elasticsearch.Search
    connection:
      hosts:
        - "http://localhost:9200"
    indexes:
      - "my_index"
    request:
      query:
        term:
          name:
            value: 'john'

Properties

connection

The connection properties.

request

  • Type: object
  • Dynamic: ✔️
  • Required: ✔️

The ElasticSearch value.

Can be a JSON string. In this case, the contentType will be used or a raw Map.

contentType

  • Type: string
  • Dynamic:
  • Required:
  • Default: JSON
  • Possible Values:
    • CBOR
    • JSON
    • SMILE
    • YAML

The content type of value.

Not used anymore.

fetchType

  • Type: string
  • Dynamic:
  • Required:
  • Default: FETCH
  • Possible Values:
    • STORE
    • FETCH
    • FETCH_ONE
    • NONE

The way you want to store the data.

FETCH_ONE output the first row, FETCH output all the rows, STORE store all rows in a file, NONE do nothing.

indexes

  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:

The ElasticSearch indices.

Default to all indices.

routing

  • Type: string
  • Dynamic: ✔️
  • Required:

Controls the shard routing of the request.

Using this value to hash the shard and not the id.

Outputs

row

  • Type: object
  • Required:

rows

  • Type: array
  • SubType: object
  • Required:

size

  • Type: integer
  • Required:

total

  • Type: integer
  • Required:

uri

  • Type: string
  • Required:
  • Format: uri

Definitions

io.kestra.plugin.elasticsearch.ElasticsearchConnection

  • hosts
    • Type: array
    • SubType: string
    • Dynamic: ✔️
    • Required: ✔️
    • Min items: 1
  • basicAuth
  • headers
    • Type: array
    • SubType: string
    • Dynamic: ✔️
    • Required:
  • pathPrefix
    • Type: string
    • Dynamic: ✔️
    • Required:
  • strictDeprecationMode
    • Type: boolean
    • Dynamic:
    • Required:
  • trustAllSsl
    • Type: boolean
    • Dynamic:
    • Required:

io.kestra.plugin.elasticsearch.ElasticsearchConnection-BasicAuth

  • password
    • Type: string
    • Dynamic: ✔️
    • Required:
  • username
    • Type: string
    • Dynamic: ✔️
    • Required: