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.
-
Method Details
-
name
The name 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 actualfloat
. Extracters returned from this method should be stateless stateless and can be reused. Pathological implementations of themap
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.
-