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

Empty index query: Improve error explanation? #110

Closed
traud opened this issue Nov 12, 2021 · 2 comments
Closed

Empty index query: Improve error explanation? #110

traud opened this issue Nov 12, 2021 · 2 comments

Comments

@traud
Copy link

traud commented Nov 12, 2021

My Regular Expression (RegEx), explained on debian-devel, returns:

Error: Loading search result package list failed:
This query was refused by the server: Empty index query

works: \x2f\x2a\x40\x7d avoids escaping errors (HTML, RegEx engine, you never know)
works: /\*@} escape for the star required
works: /\*\s+@} at least one whitespace character between /* and @}
not: /\*\s*@} whitespace optional
not: [^/]//\s*@} same issue but C++ style comment pattern, like //@}

Going through the underlying Bachelor thesis, the search tree has problems with optional whitespace, I guess. In my case, I worked around it by searching without whitespace and again with at least one whitespace. Anyway, is it possible to improve the error massage, for example by linking to the Bachelor thesis (or by explaining the search tree stuff in short form), when RegEx was selected?

@stapelberg
Copy link
Contributor

Going through the underlying Bachelor thesis, the search tree has problems with optional whitespace, I guess.

I don’t think the problem is specific to whitespace. I can reproduce it also with /\*a*@}.

I think the problem is related to the code not finding enough consecutive non-optional characters to construct any trigrams to query the index with. In other words: your regexp has a too short start, and a too short end, with too much optionality in the middle :)

I can add an entry to the faq and link to it from the error message.

@traud
Copy link
Author

traud commented Nov 18, 2021

Ahh. Then the error is about having too much ‘optionality’ and my approach splitting it into two distinct, more specific queries (one with at least one space, and one with no space at all) was the way to go. Thanks for clarifying!

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

2 participants