aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/query/lexer.go
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2025-06-19 01:22:19 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2025-06-19 01:22:19 -0400
commit21d72b2f67fb065d9071907c5c3307434aad3795 (patch)
tree9313ca1091d0f4c9b3252639d33b582c58f72d87 /pkg/query/lexer.go
parent649bbdf8d3fdda4423f2f30bbf98698e8f2faa07 (diff)
Add multiple clause and tree level optimizations
Implement optimizations that can be called in parallel or serial. Optimizations occur mostly in place and result in a logically equivalent tree when used correctly. Optimizations ============= * Sort - sort all statements within a clause tree * Simplify - apply negation rules to all statements * Flatten - merge child clauses with parents * Compact - merge equivalent statements * Tidy^ - remove zero statements * Contradictions - zero contradicting statements and clauses * StrictEquality - zero fuzzy statements when exact statements are within clause * Tighten - combine multiple fuzzy statements to the least (AND) or most (OR) restrictive bounds ^: when used incorrectly can turn an invalid clause tree into a valid one
Diffstat (limited to 'pkg/query/lexer.go')
-rw-r--r--pkg/query/lexer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/query/lexer.go b/pkg/query/lexer.go
index 4d875fb..759b5bc 100644
--- a/pkg/query/lexer.go
+++ b/pkg/query/lexer.go
@@ -340,6 +340,6 @@ func init() {
LexRegexPattern = clausePattern
// FIXME: fails to match start of clauses with no values
- // ex: (and (or ... )) fails
+ // example: (and (or ... )) fails
LexRegex = regexp.MustCompile(LexRegexPattern)
}