You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some input query strings and the results of parsing them. case: seems to not have any effect on the parsed query unless it's in the top-level expression.
foo bar -> (and substr:"foo" substr:"bar")
foo bar case:yes -> (and case_substr:"foo" case_substr:"bar")
foo bar case:no -> (and substr:"foo" substr:"bar")
foo or bar -> (or substr:"foo" substr:"bar")
foo or bar case:yes -> (or case_substr:"foo" case_substr:"bar")
foo or bar case:no -> (or substr:"foo" substr:"bar")
# `case:` does nothing if not at the top level.
(foo case:yes) bar -> (and substr:"foo" substr:"bar")
(case:yes foo) bar -> (and substr:"foo" substr:"bar")
(case:yes foo (bar)) -> (and substr:"foo" substr:"bar")
case: has special "application" logic (as it only modifies other expressions instead of doing anything on its own) and I suspect there is something wrong with it in that regard:
I believe the problem is that the logic to identify caseQ expressions in that for-loop only iterates over top-level expressions. It needs to iterate the entire tree of expressions, with lower caseQs overriding higher ones.
(By that reasoning it may be that Type expressions have the same problem, but I don't really understand what those are supposed to do even normally 🌞.)
The text was updated successfully, but these errors were encountered:
Here are some input query strings and the results of parsing them.
case:
seems to not have any effect on the parsed query unless it's in the top-level expression.case:
has special "application" logic (as it only modifies other expressions instead of doing anything on its own) and I suspect there is something wrong with it in that regard:zoekt/query/parse.go
Lines 322 to 339 in 2560773
I believe the problem is that the logic to identify
caseQ
expressions in that for-loop only iterates over top-level expressions. It needs to iterate the entire tree of expressions, with lowercaseQ
s overriding higher ones.(By that reasoning it may be that
Type
expressions have the same problem, but I don't really understand what those are supposed to do even normally 🌞.)The text was updated successfully, but these errors were encountered: