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

Add Lucene compliant regex filter expression #675

Merged
merged 35 commits into from
Oct 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
21acdd5
Rebase
djkhl Sep 26, 2024
24ad37f
Adding lucine compliance unit test for development
fabian-moessner Sep 27, 2024
a1f2f47
Adding lucene compliance for filter parsing of a rule.
fabian-moessner Oct 2, 2024
e33bebd
Adding logger with deprecation warning for regex_fields
fabian-moessner Oct 7, 2024
af3524e
Add comment and documentation for lucene regex filter annotation
fabian-moessner Oct 7, 2024
62a777a
Quickfix for lucene regex filter
fabian-moessner Oct 7, 2024
7988810
Adjusting Format
fabian-moessner Oct 7, 2024
6815fb4
Adjusting Format 2
fabian-moessner Oct 7, 2024
8e98add
Adjusting Format 3
fabian-moessner Oct 7, 2024
ff0071c
Attempting to remove indeces for regex filter string
fabian-moessner Oct 9, 2024
7695373
Adding notebook for lucene regex filter development
fabian-moessner Oct 9, 2024
fdf8c37
WIP notebook for lucene regex filter development
fabian-moessner Oct 10, 2024
a6fcb3e
Adding Notebook for lucene regex filter testing.
Oct 22, 2024
1c8a302
Adding Notebook for lucene regex filter testing same results as unit …
Oct 23, 2024
5a3d347
Adding first running version of lucene regex filter
Oct 23, 2024
dbf63d2
Improving notebook for lucene conform regex filter.
Oct 24, 2024
b88683d
Improving notebook for lucene conform regex filter 2.
Oct 24, 2024
9d0ce73
Slight improve
Oct 24, 2024
04a0a09
Bug fix in regex notebook.
Oct 24, 2024
74361b5
Adding Deprecated Warning
Oct 24, 2024
41b0e6a
Removing temporary test
Oct 25, 2024
d6dc4c4
Adding rule tests for lucene compliance
Oct 25, 2024
5b190b3
Black formatting
Oct 25, 2024
4adeb42
Black formatting
Oct 25, 2024
002e09a
Remove prototypey
Oct 28, 2024
c1fb5ad
add changelog entry and some prototypey things that actually do nothi…
djkhl Sep 26, 2024
029766d
Adding lucine compliance unit test for development
fabian-moessner Sep 27, 2024
e14fe60
Adding lucene compliance for filter parsing of a rule.
fabian-moessner Oct 2, 2024
68aa1ca
Quickfix for lucene regex filter
fabian-moessner Oct 7, 2024
148b36c
Adjusting Format 2
fabian-moessner Oct 7, 2024
e62f4be
Adding Deprecated Warning
Oct 24, 2024
6675c41
Black formatting
Oct 25, 2024
308482d
Add documentation
Oct 28, 2024
4adb5d4
Delete prototypeclass
Oct 28, 2024
42bf7d2
add notebook to documentation
djkhl Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjusting Format 3
fabian-moessner authored and MoessnerFabian(Group) committed Oct 28, 2024
commit 8e98add25f0a856b4f865d984ee6f4788b3c949f
4 changes: 2 additions & 2 deletions logprep/filter/lucene_filter.py
Original file line number Diff line number Diff line change
@@ -244,13 +244,13 @@ def __init__(self, tree: luqum.tree, special_fields: dict = None):
# DEPRECATION: regex_fields are no longer necessary.
logger.warning(
"[Deprecation]: special_fields are no longer necessary. "
"Use Lucene regex annotation for filter. "
"Use Lucene regex annotation for filter. "
)

self._last_search_field = None

def recognize_regex_and_add_special_fields(self):
"""Recognize regex expressions in filter and add those fields to regex_fields. """
"""Recognize regex expressions in filter and add those fields to regex_fields."""
for child in self._tree.children:
try:
value = child.children[0].value[1:-1]