Skip to content
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

[search in workspace] Unstable ordering of search results #4113

Closed
svenefftinge opened this issue Jan 20, 2019 · 2 comments · Fixed by #5669
Closed

[search in workspace] Unstable ordering of search results #4113

svenefftinge opened this issue Jan 20, 2019 · 2 comments · Fixed by #5669

Comments

@svenefftinge
Copy link
Contributor

The ordering of search results isn't ordered consistently but is different on every search.

Reproduce:

Open in Gitpod

(trigger search several times)

@vince-fugnitto
Copy link
Member

@svenefftinge I wonder if it would be useful to not trigger re-search whenever the search and options remain the same. Keeping the history of past searches can be useful since vscode has the mechanism to list past searches when the keybiding alt+ or alt+ on the search input field.

I also noticed ripgrep has the --sort flag but using it means searches will be performed sequentially over parallel.

@kittaakos
Copy link
Contributor

Moved from #4416 (comment):

I got back different hit counts for the same query term. See attached screencast.
I set the inclusion pattern, after hitting Esc I got back different result numbers. It is clear, we limit the search to 2k result items by default, but as a user, I expect to have the same result for the same search.

screencast 2019-02-25 08-55-31

vince-fugnitto added a commit that referenced this issue Jul 8, 2019
Fixes #4113

Currently, the `search-in-workspace` result order is not consistent/stable
and can lead to different ordering between search results. The fix was to
ensure that the tree is properly rendered in order in the `onDone` callback.
The first step is to sort by the `root folders` and then update it's children
by sorting them as well.

Signed-off-by: Vincent Fugnitto <[email protected]>
vince-fugnitto added a commit that referenced this issue Jul 9, 2019
Fixes #4113

Currently, the `search-in-workspace` result order is not consistent/stable
and can lead to different ordering between search results. The fix was to
ensure that the tree is properly rendered in order in the `onDone` callback.
The first step is to sort by the `root folders` and then update it's children
by sorting them as well.

Signed-off-by: Vincent Fugnitto <[email protected]>
vince-fugnitto added a commit that referenced this issue Jul 9, 2019
Fixes #4113

Currently, the `search-in-workspace` result order is not consistent/stable
and can lead to different ordering between search results. The fix was to
ensure that the tree is properly rendered in order in the `onDone` callback.
The first step is to sort by the `root folders` and then update it's children
by sorting them as well.

Signed-off-by: Vincent Fugnitto <[email protected]>
vince-fugnitto added a commit that referenced this issue Jul 10, 2019
Fixes #4113

Currently, the `search-in-workspace` result order is not consistent/stable
and can lead to different ordering between search results. The fix was to
ensure that the tree is properly rendered in order in the `onDone` callback.
The first step is to sort by the `root folders` and then update it's children
by sorting them as well.

Signed-off-by: Vincent Fugnitto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants