Skip to content

keyword search in ESQL is too slow compared to KQL/DSL #104517

Open
@getkub

Description

@getkub

Elasticsearch Version

8.11.4

Installed Plugins

No response

Java Version

bundled

OS Version

Kubernetes

Problem Description

in KQL Searching a keyword is much faster. But in ESQL there is no 'keyword' search function. But only wildcard and it is too slow

KQL is much faster on large datasets (due to keyword search ability) and ESQL is very poor and even time-out in most cases

Steps to Reproduce

Eg

# Sample data
{"employer_domain": "COM", "employer_country": "UNITED STATES"}
{"employer_domain": "ORG", "employer_country": "UNITED STATES"}
{"employer_domain": "COM", "employer_country": "UNITED KINGDOM"}
{"employer_domain": "COM", "employer_country": "THE UNITED COUNTRY"}
# KQL

employer_domain:"COM" AND employer_country:UNITED
# ESQL

| where employer_domain=="COM" AND employer_country LIKE "*UNITED*"

I couldn't find an ESQL command to just put the UNITED keyword as I've to put *UNITED*

Suggestions

Some options like

  • Have a new command like CONTAINS or SEARCH so it dedicately searches for keyword?
  • Uplift LIKE command to put keywords. So | where employer_country LIKE " UNITED " (there is space before after UNITED)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions