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

Attempt to shorten OR'd field regexes into a single condition #38

Open
kelnage opened this issue Mar 13, 2023 · 0 comments
Open

Attempt to shorten OR'd field regexes into a single condition #38

kelnage opened this issue Mar 13, 2023 · 0 comments

Comments

@kelnage
Copy link
Collaborator

kelnage commented Mar 13, 2023

When a query contains multiple OR'd regular expressions, each testing the same field for similar strings (i.e., (fieldA=~"abc" OR fieldA=~"abd" OR fieldA=~"abe"), we could generate a shorter/easier to read (and possibly better performance?) query if we combined them into a single regex using brackets and vertical bars - especially if a common substring from each pattern could be extracted (i.e., fieldA=~"ab(c|d|e)" achieves the same outcome and is much easier to read).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant