quickwit-datasource
quickwit-datasource copied to clipboard
feat: Improved autocompletion
Hi first time contribution here :)
My typescript is also bad so please be gentle and suggest feedback where neccessary!
Love quickwit but wanted to try a small PR to see how easy it was to make changes to the plugin and hopefully contribute some more changes in the future.
Motivation
Autocompletion is great but two things bugged me:
- When completing between two quotes; eg:
span_attributes.filename:"CURSOR_IS_HERE"the suggestions will be surrounded by quotes. When accepting the suggestion, the final quote is inserted before the ending quote and as such we end up with incorrect syntax ofspan_attributes.filename:"SUGGESTION"" <--extra quote - Autocompletion is limited to the first 100 results. This PR uses the field value to prefix search the terms. We need this when we are searching across a field with thousands of terms but the current implementation will never return any result beyond the initial 100 (sorted alphabetically).
Hey @uptickmetachu! thanks for your contribution! Let me review it and get back to you.
Happy to add a Loom/video recording of the changes in action as well if that helps with the review.
Not needed, will review it today! thanks!
@fmassot hi! How is going?
Would be cool to see it merged :) @fmassot
Sorry for the delay, I will review the PR this week.
@foxdalas @kuzaxak @uptickmetachu I tried to reproduce but it seems fixed. Can you test the latest version of the plugin?
Using 0.5
Double quotes still happening
https://www.loom.com/share/4647c64b491f4bee9642b500f80b947c
Unable to autocomplete beyond the limit
Don't have a video for this one but I'm still unable to auto complete beyond the initial window size of results.
@fmassot