-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API for fieldname suggestion/completion #74816
Comments
Pinging @elastic/es-search (Team:Search) |
This implementation has the following issues: * probably many `terms_enum` references that need renaming to `fields_enum` (a lot of copy and paste was used) * the implementation offers infix matching although I expect we’ll revert to prefix matching only once we’ve got the Kibana requirements, Closes elastic#74816
This implementation has the following issues: * probably many `terms_enum` references that need renaming to `fields_enum` (a lot of copy and paste was used) * the implementation offers infix matching although I expect we’ll revert to prefix matching only once we’ve got the Kibana requirements, Closes elastic#74816
Hi @markharwood I'm working on a project definition for field list hierarchies in Kibana, and was led to this issue. It looks like this new API will be useful in Kibana to provide a unified experience to allow users to quickly find a field they're looking for when it is in an
|
hey @tsullivan thanks for the ping. The work on this API has been suspended. We need to get back to it but we are not sure when we will get to it. It would be good to sync up and collect all the usecases for this new API, the needs and eventually re-prioritize this effort. |
We discussed this in the team. We currently rely on having all fields available the doing filename suggestions. Here are 2 examples: Adding filters: The question is, having just a field suggestion/completion would not be sufficient. We would also need to be able to filter by type, and also we would need information about the capabilities of the field. Also helpful it would be to filter out fields without values. All this sounds like something we already have ... the |
Speed. Field caps is not made to provide real-time suggestions. Yet if we were to create a more responsive API targeted at suggestions, we would have to accept limited functionality to keep it fast. |
Linking more issues with use cases @lukasolson identified that could benefit from this API: |
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
Like the recently added
terms_enum
api, there is a need for clients like Kibana to help people complete the values they are typing. This requires a high-speed API to look up field names that match parts of what the user has already typed.It's true to say that clients like Kibana typically already have ready access to lists of the physical fields in an index but the one omission is the potentially millions of "soft" field names introduced by the
flattened
field type which exist as document data in the index. Previously we had considered creating an API for listing just flattened field names but for practical purposes it would be convenient for clients if there was one elasticsearch API for autocompleting all field names, flattened or otherwise.Usability concerns
The precise details of the API will depend to a large extent on the user experience clients want to provide and these are being discussed by members of the Kibana team (cc @elastic-jb ).
There are 2 main styles of matching -
infix
andprefix
- either matching user input anywhere in the field name (infix) or completing the end of the field name being typed (prefix). Both have their merits-bytes
might match the field namessource.http.bytes_sent
andtarget.dns.bytes
. The user only cares about fields that mention bytes.object
fields so typingdns
would matchdns.answers
anddns.id
and further selectingdns.answers
would revealdns.answers.name
anddns.answers.id
.This raises the question do users want to make use of the hierarchical structure of documents or ignore it completely?
Infix matching concerns
Infix matching is more expensive to run on flattened fields with millions of values so we will either not support it at all or curtail exploration after a max number of terms scanned or time taken
Prefix matching concerns
Is this a breadth-first match of matching values or depth-first? So in ECS would prefix completion of
c
suggesta) breadth-first
client
cloud
andcontainer
ORb) depth-first
client.address
,client.bytes
,client.domain
etc?With a) would the client only see values for
client
likeclient.address
after they had typed the ending full stop e.g.client.
? This is how completion works in a unix shell when typing field names in the command line - you only see the files in subdirectories when you put the/
character at the end of whatever containing folder name e.g. typingD
and using tab-completion will not suggest filenames from theDownloads
orDocuments
folder until you typeDownloads/
orDocuments/
. Clearly the client needs to know which fields represent objects or "leaf" fields with no subvalues. In the unix shell these suggestions are displayed differently (folders are always displayed with the trailing/
)Results format
Unlike the terms_enum api, returning simple strings with the matching names is probably not sufficient. We should probably return some type information too. Again, some input from UX teams would help here.
The text was updated successfully, but these errors were encountered: