-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Crash when sorting by nonexistent field #1734
Comments
It seems to be actually a particular case of another bug: if a query term (that is not a field-query, and not a regular expression query) ends with At the current revision (0a719a0):
There is also some interference/ambiguity with the syntax of One of the culprits seems to be the |
Thanks for digging deeper! You're absolutely right about the cause. About the ambiguity: great point. From my perspective, it's not all that important who "wins" for a query like And about the fix: It should be legal to sort by fields that don't exist on all entries in the database. In the same way that In fact, perhaps the fix is as simple as changing that line to:
|
* Fix crash when sorting by nonexistent field. * Add tests for queries with nonexistient fields for sorting.
* Fix crash when sorting by nonexistent field. * Add tests for queries with nonexistient fields for sorting.
Fix for crash when sorting by nonexistent field (#1734)
Executing the query string "--" exposes a bug in the query parser.
The same occurs for any sequence of dashses longer than two: "-------" results in the same crash. Interestingly, "----foo" does not.
The text was updated successfully, but these errors were encountered: