Interface NodeStringMapper


public interface NodeStringMapper
Identifier-substitution strategy used during Node.nodeString rendering. Pairs with Node.NodeStringFormat: format controls output shape (truncation, width); this mapper controls how column / index names and literal values are emitted. Each nodeString implementation that mentions an identifier or literal asks the mapper for the value to emit.

All methods are abstract on purpose: every implementer must make a deliberate decision per identifier kind. A default method here would let a partial override silently inherit pass-through behavior for the methods it didn't define, which is exactly the leak vector this SPI exists to prevent. The IDENTITY constant is one concrete implementation of the contract — pass-through for all three kinds — embedded here so call sites that want the raw rendering can name it directly.

Stays narrow on purpose: only three methods, all generic. Pattern-bearing classes (Dissect, Grok, RegexMatch, UnresolvedNamePattern, ...) parse their own pattern structure and route each extracted capture / identifier through column(java.lang.String); the mapper never carries syntax- specific knowledge. Adding a new pattern type doesn't touch this interface.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final NodeStringMapper
    Pass-through.
  • Method Summary

    Modifier and Type
    Method
    Description
    column(String name)
    Map a column / attribute / alias / qualifier / pattern capture name.
    index(String name)
    Map an index pattern / concrete index / view / enrich-policy index name.
    literal(Object value, DataType type)
    Map a literal value of the given data type.
    opaque(String text)
    Map a free-form / opaque text fragment that carries no parseable identifier structure — a raw Lucene QueryBuilder DSL, a sort or stats descriptor, an external source path.
  • Field Details

    • IDENTITY

      static final NodeStringMapper IDENTITY
      Pass-through. The default for raw rendering.
  • Method Details

    • column

      String column(String name)
      Map a column / attribute / alias / qualifier / pattern capture name.
    • index

      String index(String name)
      Map an index pattern / concrete index / view / enrich-policy index name.
    • literal

      String literal(Object value, DataType type)
      Map a literal value of the given data type. Returns just the value portion; "[type]" suffix is appended by the caller so "5[LONG]" and "0[LONG]" share the same shape.
    • opaque

      String opaque(String text)
      Map a free-form / opaque text fragment that carries no parseable identifier structure — a raw Lucene QueryBuilder DSL, a sort or stats descriptor, an external source path. Returns the text verbatim under IDENTITY; an anonymizing mapper returns a redaction marker, since such text can't be safely tokenized without risking a partial leak. Lets a node keep the field in place with no == IDENTITY branch — same shape, redacted value.