From 308482d55d7e0a07f95f27cf66749fe5a208d5e1 Mon Sep 17 00:00:00 2001 From: "MoessnerFabian(Group)" Date: Mon, 28 Oct 2024 13:06:00 +0100 Subject: [PATCH] Add documentation --- logprep/filter/lucene_filter.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/logprep/filter/lucene_filter.py b/logprep/filter/lucene_filter.py index f1cdca06a..18a5187ee 100644 --- a/logprep/filter/lucene_filter.py +++ b/logprep/filter/lucene_filter.py @@ -62,7 +62,18 @@ ------------ It is possible use regex expressions to match values. -For this, the field with the regex pattern must be added to the optional field +To be recognized as a regular expression the filter field has to be start and end with +:code:`/`. + + +.. code-block:: yaml + :linenos: + :caption: Example + + filter: 'ip_address: "/192\.168\.0\..*/"' + + +[Deprecated, but still functional] The field with the regex pattern must be added to the optional field :code:`regex_fields` in the rule definition. In the following example the field :code:`ip_address` is defined as regex field.