Skip to content

[DSL] 7.1 Client integration #3180

@margaretjgu

Description

@margaretjgu

Size: M

Description:
Integrate DSL packages with js client.

Implementation:

import { Client } from '@elastic/elasticsearch'
import { ESQL } from '@elastic/esql-dsl'

const client = new Client({ node: '...' })

// Query objects work directly
const query = ESQL.from('employees').where(E('salary').gt(50000))
const response = await client.esql.query({ query })

Acceptance:

  • ES|QL queries accepted by client.esql.query()
  • Search queries accepted by client.search()
  • toString() called automatically where needed
  • TypeScript types work with client
  • Integration tests with real ES

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions