Skip to content

Commit

Permalink
Fix bug lucene lex (#742)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Jörg Zimmermann <[email protected]>
  • Loading branch information
kmeinerz and Jörg Zimmermann authored Jan 15, 2025
1 parent 4bd0756 commit f120c6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Features
### Improvements
### Bugfix
* fixes a conflict between lucene filter and the Crypto module

## 15.1.0
### Breaking
Expand Down
2 changes: 1 addition & 1 deletion logprep/filter/lucene_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def create(query_string: str, special_fields: dict = None) -> FilterExpression:
escaped_string = LuceneFilter._add_lucene_escaping(query_string)

try:
tree = parser.parse(escaped_string)
tree = parser.parse(escaped_string, lexer=luqum.parser.lexer)
transformer = LuceneTransformer(tree, special_fields)
except ParseSyntaxError as error:
msg = f"{error} Expression: '{escaped_string}'" + " - expression not escaped correctly."
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/filter/test_lucene_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from pytest import raises

from logprep.filter.expression.filter_expression import (
And,
Always,
And,
Exists,
Not,
Null,
Expand Down

0 comments on commit f120c6c

Please sign in to comment.