Record Class ESEmitterConfig

java.lang.Object
java.lang.Record
org.apache.tika.pipes.emitter.es.ESEmitterConfig
Record Components:
esUrl - Full URL including index, e.g. https://localhost:9200/my-index
idField - Metadata field to use as the document _id
attachmentStrategy - How to handle embedded documents
updateStrategy - Whether to overwrite or upsert
commitWithin - Not used by ES, kept for API parity with OpenSearch emitter
embeddedFileFieldName - Field name for embedded-file relation
apiKey - API key for authentication (Base64-encoded id:api_key). Sent as Authorization: ApiKey <value>. If null/empty, falls back to httpClientConfig's userName/password for basic auth.
httpClientConfig - HTTP connection settings (basic auth, timeouts, proxy)

public record ESEmitterConfig(String esUrl, String idField, ESEmitterConfig.AttachmentStrategy attachmentStrategy, ESEmitterConfig.UpdateStrategy updateStrategy, int commitWithin, String embeddedFileFieldName, String apiKey, HttpClientConfig httpClientConfig) extends Record
Configuration for the ES emitter.
  • Constructor Details

  • Method Details

    • load

      public static ESEmitterConfig load(String json) throws TikaConfigException
      Throws:
      TikaConfigException
    • toString

      public String toString()
      Overrides the record default to prevent apiKey leaking into logs.
      Specified by:
      toString in class Record
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • esUrl

      public String esUrl()
      Returns the value of the esUrl record component.
      Returns:
      the value of the esUrl record component
    • idField

      public String idField()
      Returns the value of the idField record component.
      Returns:
      the value of the idField record component
    • attachmentStrategy

      public ESEmitterConfig.AttachmentStrategy attachmentStrategy()
      Returns the value of the attachmentStrategy record component.
      Returns:
      the value of the attachmentStrategy record component
    • updateStrategy

      public ESEmitterConfig.UpdateStrategy updateStrategy()
      Returns the value of the updateStrategy record component.
      Returns:
      the value of the updateStrategy record component
    • commitWithin

      public int commitWithin()
      Returns the value of the commitWithin record component.
      Returns:
      the value of the commitWithin record component
    • embeddedFileFieldName

      public String embeddedFileFieldName()
      Returns the value of the embeddedFileFieldName record component.
      Returns:
      the value of the embeddedFileFieldName record component
    • apiKey

      public String apiKey()
      Returns the value of the apiKey record component.
      Returns:
      the value of the apiKey record component
    • httpClientConfig

      public HttpClientConfig httpClientConfig()
      Returns the value of the httpClientConfig record component.
      Returns:
      the value of the httpClientConfig record component