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

Query execution bug with groups #79

Open
KonradStanski opened this issue Nov 19, 2024 · 3 comments
Open

Query execution bug with groups #79

KonradStanski opened this issue Nov 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@KonradStanski
Copy link
Contributor

KonradStanski commented Nov 19, 2024

When executing the query
test lang:python on the demo, this produces 15 results:
https://sourcebot.dev/search?query=test%20lang%3Apython
When this is changed to
test (lang:python) this drops to 0.
https://sourcebot.dev/search?query=test%20(lang%3Apython)

this should be equivalent, so something is getting mangled.

@KonradStanski
Copy link
Contributor Author

May be because the () are not being escaped correctly in the URL?
%28 could be used instead?
I have not looked at how the querying is passed down yet, but this should be fixed too.

@brendan-kellam
Copy link
Contributor

I need to dig more into how the zoekt parser works, but for reference test lang:python and (test lang:python) are equivalent. (1, 2)

Another data point is that lang:python works, but (lang:python) does not (1, 2).

Ultimately, these feel like edge-case within zoekt's parser. One UX thing we can do is add error underlying (aka "red squiggles") that highlight syntax errors in the user's query.

@brendan-kellam brendan-kellam added the bug Something isn't working label Nov 20, 2024
@KonradStanski
Copy link
Contributor Author

I tried this with sourcegraph, and it seems to work there. Is there any chance that the sourcebot backend is doing anything?
Alternatively I can open a PR in the zoekt repo adding this as a test case (and fix it there in the parser if it's actually broken)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants