Skip to content

[Autocomplete] Integrate new autocomplete API #92783

Closed
@lizozom

Description

@lizozom

The Elasticsearch team is developing a new, faster API for autocomplete.
We need to integrate this new API into the value suggestions route (/api/kibana/suggestions/values/${index}).

API format

Courtesy of @markharwood

Request

{
	"field": "obj.foo",
	"string": "foo",
	"case_insensitive": true,
	"size": 100
}

Response

{
  "_shards": {
    "total": 1,
    "successful": 1,
    "failed": 0
  },
  "terms": [
    "foo"
  ]
}

Errors will be returned in standard Elasticsearch format (root cause and all)

Case sensitivity

The new API will support both case sensitive and insensitive searches, resolving #97797
@shahzad31

Filter editor

While we're used to thinking about autocomplete suggestions in the context of the search bar's input, the same API is also used in the filter editor to provide a list of values for each field.

image

We could improve the performance of this component by using the new API.
@jimczi also suggested implementing pagination of the autocomplete results (which is easy to implement in ES) to improve performance even more.

Incomplete suggestions indicator

We need to consider how to let a user know, that the autocomplete results they are seeing are incomplete. This is relevant for both the search bar (KQL input area) and the field editor.

@elastic-jb @mdefazio

Telemetry

In #91428 we introduced telemetry to measure the quality of our autocomplete suggestions:

  • how many characters did the user type before choosing a suggestion
  • what was the index of the selected suggestion in the list.

This telemetry should not change so we can compare it to telemetry from 7.12 (the old, slower, implementation).

Metadata

Metadata

Assignees

Labels

Feature:SearchQuerying infrastructure in KibanaenhancementNew value added to drive a business resultimpact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.loe:largeLarge Level of Effortv7.14.0v8.0.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions