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

Better grouped-expression heuristics #10013

Closed
rvantonder opened this issue Apr 20, 2020 · 3 comments
Closed

Better grouped-expression heuristics #10013

rvantonder opened this issue Apr 20, 2020 · 3 comments
Assignees

Comments

@rvantonder
Copy link
Contributor

Usability of and/or queries is hampered by tight binding to filters. The query:

repo:^github\.com/sourcegraph/sourcegraph$ (a and b) or (c and d)

needs parentheses:

repo:^github\.com/sourcegraph/sourcegraph$ ((a and b) or (c and d))

as the hoist heuristic is not sufficient for more nested expressions. For future nested searches, the interpretation

(repo:^github\.com/sourcegraph/sourcegraph$ a and b) or (c and d)

is indeed what we want, but this is arguably less common than the former example. The right move might just be to remove tight binding to fields.

@rvantonder rvantonder self-assigned this Apr 20, 2020
@rvantonder
Copy link
Contributor Author

An ideal solution would be to have a "showing results for..." with a parenthesized query according to some heuristics, that can be changed.

@rvantonder
Copy link
Contributor Author

Similar to examples in #9816

@rvantonder
Copy link
Contributor Author

All reasonable heuristics are implemented in previous iterations, closing.

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

No branches or pull requests

1 participant