Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danotorrey committed Feb 7, 2025
1 parent 666513e commit 562d4c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion changelog/unreleased/issue-21565.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type = "fixed"
message = "Fix issue preventing quoted entity search values from finding exact matches on various pages throughout Graylog."
message = "Fixed issue preventing quoted entity search values from finding exact matches on various pages throughout Graylog."

issues = ["21565"]
pulls = ["21567"]
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ public class SearchQueryParser {

// Pattern to split a search query into individual parsable elements terms.
private static final String TERM_SPLIT_PATTERN =
"(\\S+:(=|=~|<|<=|>|>=)?'(?:[^'\\\\]|\\\\.)*')|" + // Field-specific terms with single-quotes: title:'value'
"(\\S+:(=|=~|<|<=|>|>=)?\"(?:[^\"\\\\]|\\\\.)*\")|" + // Field-specific terms with double-quotes title:"value"
"['\"][^\\\\]*?(?:\\\\.[^\\\\]*)*?['\"]|" + // Single quoted value: "value one"
"\\S+:(=|=~|<|<=|>|>=)?\\S+|" + // Field-specific terms without quotes title:value
"(\\S+:(=|=~|<|<=|>|>=)?'(?:[^'\\\\]|\\\\.)*')|" + // Split field-specific terms with single-quotes: title:'value'
"(\\S+:(=|=~|<|<=|>|>=)?\"(?:[^\"\\\\]|\\\\.)*\")|" + // Split field-specific terms with double-quotes title:"value"
"['\"][^\\\\]*?(?:\\\\.[^\\\\]*)*?['\"]|" + // Split single quoted value: "value one"
"\\S+:(=|=~|<|<=|>|>=)?\\S+|" + // Split field-specific terms without quotes title:value
"\\S+"; // Split the words of any other string value

// This needs to be updated if more operators are added
Expand Down

0 comments on commit 562d4c8

Please sign in to comment.