-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Quick File Open: Support for Search Queries with Whitespaces #8989
Quick File Open: Support for Search Queries with Whitespaces #8989
Conversation
5cba075
to
23ca2a3
Compare
227199b
to
0339464
Compare
0339464
to
999ac96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes work very well for me, and the results are much better than master
.
I am now able to search with whitespaces
, and the scoring has been properly updated to take whitespaces into consideration and prioritize exact matches.
999ac96
to
7692b7e
Compare
13a0c7f
to
efced8d
Compare
What it Does Fixes [eclipse-theia#8747](eclipse-theia#8747) - Allows whitespaces to be included in a `quick file open` search query. - Adds support for whitespaces in the scoring of file search results - Adds tests for whitespace queries (considers fuzzy matching and search term order). How to Test 1. `ctrl + p` to `quick file open` 2. Search for a file with a query that includes whitespaces (eg. `readme core`) 3. Observe that whitespaces do not affect the search results Alternatively, run `@theia/file-search` tests. Signed-off-by: seantan22 <sean.a.tan@ericsson.com>
efced8d
to
48a305a
Compare
@colin-grant-work I found an issue with the previous approach with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I reviewed and tested the changes on my side, confirmed that the feature is working correctly. Nice to be able to search with whitespaces
!
So the basic functionality is working, but there is one defect when searching with whitespace. With no whitespace, we get highlighting in the results: with whitespace, we get no highlighting: It's still an improvement (I'd rather see the results with no highlighting than have to constantly remember not to put spaces in my queries), but it would be great to get the highlighting functionality working, as well. |
The highlighting is a known issue #4548 and would require some extensive changes on how we compute the matching (#5638 (comment)). For that reason I'm fine with omitting it from the pull-request as it is out of scope. |
Sounds good. Having touched the highlighting code lightly, I agree it would be a huge lift for this PR. My approval is reaffirmed. |
I'll merge tomorrow if there are no objections :) |
What it does
Fixes #8747
quick file open
search query.term order).
How to test
ctrl + p
toquick file open
readme core
)Alternatively, run
@theia/file-search
tests.Before Changes:
After Changes:
Review checklist
Reminder for reviewers
Signed-off-by: seantan22 sean.a.tan@ericsson.com