Skip to main content
Version: 5.3

match

info

These innovations work starting from version 5.3.1.

Description

Filters data from the source by field values from an external index. If OUTPUT or OUTPUTNEW is specified, the event will be enriched with the specified fields.

The command performs comparison of a specified field in the event and match-index. For match-index data, wildcard search is supported if the data contains wildcard characters * and ?.

Please note!

You should avoid using duplicate data in fields for the match-index.

Syntax

...| match <match-index-name> <match-field> [as <source-field>] [match-options] [ OUTPUT | OUTPUTNEW (<match-destfield> [as <event-destfield>] )... ]

Required arguments

ParameterSyntaxDescription
match-index-name<string>Index name for building match.
match-field<string>Fields for building match subquery.

Optional arguments match-options

ParameterSyntaxDefaultDescription
packsizepacksize=<int>500Size of data block for processing.
workersworkers=<int>8Number of threads for data processing.
timefieldtimefield=<field>@timestampName of the field storing the timestamp.
earliestearliest=<string>Start timestamp for search.
latestlatest=<string>End timestamp for search.

Other optional arguments

ParameterSyntaxDefaultDescription
source-field<string>Name of the field in the main result for comparison with match-field. Used when match-field and source-field names do not match.
OUTPUT | OUTPUTNEWOUTPUT | OUTPUTNEWOUTPUTOUTPUT indicator specifies that existing data in the source query field will be overwritten with data from match. OUTPUTNEW indicator specifies that data in the source query field will be overwritten if the field is not filled but there is data for this field in match.
match-destfield<string>Name of the resulting field with data obtained from the lookup.

Query examples

Example №1
source data 
| match filter_data_index @timestamp packsize=2048
Example №2
source internal_audit*
| match audit_category_lookup audit_category packsize=2048 workers=32 OUTPUT audit_request_effective_user