java.lang.Object
org.elasticsearch.grok.GrokCaptureConfig
Configuration for a value that
Grok
can capture.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Collection of handlers for each native type. -
Method Summary
Modifier and TypeMethodDescriptionname()
The name defined for the field in the pattern.<T> T
Build an extract that has access to the "native" type of the extracter match.objectExtracter
(Consumer<Object> emit) Build a GrokCaptureExtracter that will callemit
when it extracts text, boxed if the "native" representation is primitive type.rangeExtracter
(Consumer<Object> emit) Creates a GrokCaptureExtracter that will callemit
with the extracted range (offset and length) when it extracts text.type()
The type defined for the field in the pattern.
-
Method Details
-
name
The name defined for the field in the pattern. -
type
The type defined for the field in the pattern. -
objectExtracter
Build a GrokCaptureExtracter that will callemit
when it extracts text, boxed if the "native" representation is primitive type. Extracters returned from this method are stateless and can be reused. -
nativeExtracter
Build an extract that has access to the "native" type of the extracter match. This means that patterns like%{NUMBER:bytes:float}
has access to an actualinvalid reference
float
map
parameter could violate this, but the caller should take care to stay sane.While the goal is to produce a
GrokCaptureExtracter
that provides a primitive, the caller can produce whatever type-safe constructs it needs and return them from this method. Thus the<T>
in the type signature.- Type Parameters:
T
- The type of the result.- Parameters:
map
- Collection of handlers for each native type. Only one method will be called but well behaved implementers are stateless.- Returns:
- whatever was returned by the handler.
-
rangeExtracter
Creates a GrokCaptureExtracter that will callemit
with the extracted range (offset and length) when it extracts text.
-