Closed suvamM closed 1 year ago
The match expression was changed from Private to Public in the PR, then where and how this public property will be actually used for? That is what is the need to make it public?
Should we add a release record for it?
The match expression was changed from Private to Public in the PR, then where and how this public property will be actually used for? That is what is the need to make it public?
@LingZhou-gh I tried to describe this in the PR description: we have several scenarios where we are parsing the regular expressions related to the rules. Concrete examples include the synthetic dataset generation, and also sniff regex generation. Without making the field public
, we would have to duplicate the parsing logic.
Should we add a release record for it?
@yongyan-gh I thought about it, but I don't really think this change is so large as to warrant an entry in the Release Notes.
Changes
Various recent activities have the following pattern: we consume the JSON plug-in, and parse the regular expressions. The typical way to do this is to deserialize the JSON into a
SearchDefinitions
object, and then access theMatchExpressions
list. However, this logic already exists in theCreateSkimmersFromDefinitions
method, which creates a set ofSkimmer
objects. The problem: the match expressions were private.This PR exposes the
MatchExpression
set aspublic
in theSearchSkimmer
class.Sample usage: