Skip to content

Examine how to lift restrictions on ES|QL full text functions (match and qstr) #115364

@ChrisHegarty

Description

@ChrisHegarty

This issue has been filed to examine how to remove the known restrictions of the ES|QL match and qstr functions. The limitations are:

  1. match() and qstr() can only be used in WHERE commands
  2. The field parameter can only be an ES index field
  3. match() or qstr() can't be used as part of a disjunction
    • match() with other match() disjunctions, as well as separately
    • match() with ES|QL predict disjunctions
    • The above two cases can be addressed separately, since the formed is pushable to Lucene, while the latter is not
    • There is special logic to fallback to the .keyword version of a field when doing a term query and that MATCH currently does not detect that, so because of this edge case the whole disjunction is currently disabled
  4. match() can't be used after LIMIT - https://github.com/elastic/elasticsearch/issues/1152974.
  5. qstr() can't be used after commands that change the available fields; as the query string is not analyzed, we cannot determine what fields are being used in the query to do type checks and add proper error messages. qstr() cannot be used after SHOW, ROW, DISSECT, ENRICH, EVAL, GROK, KEEP, MV_EXPAND, RENAME, STATS or LIMIT.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions