Package org.apache.tika.pipes.emitter.es
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-indexidField- Metadata field to use as the document_idattachmentStrategy- How to handle embedded documentsupdateStrategy- Whether to overwrite or upsertcommitWithin- Not used by ES, kept for API parity with OpenSearch emitterembeddedFileFieldName- Field name for embedded-file relationapiKey- API key for authentication (Base64-encodedid:api_key). Sent asAuthorization: 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionESEmitterConfig(String esUrl, String idField, ESEmitterConfig.AttachmentStrategy attachmentStrategy, ESEmitterConfig.UpdateStrategy updateStrategy, int commitWithin, String embeddedFileFieldName, String apiKey, HttpClientConfig httpClientConfig) Creates an instance of aESEmitterConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapiKey()Returns the value of theapiKeyrecord component.Returns the value of theattachmentStrategyrecord component.intReturns the value of thecommitWithinrecord component.Returns the value of theembeddedFileFieldNamerecord component.final booleanIndicates whether some other object is "equal to" this one.esUrl()Returns the value of theesUrlrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehttpClientConfigrecord component.idField()Returns the value of theidFieldrecord component.static ESEmitterConfigtoString()Overrides the record default to preventapiKeyleaking into logs.Returns the value of theupdateStrategyrecord component.
-
Constructor Details
-
ESEmitterConfig
public ESEmitterConfig(String esUrl, String idField, ESEmitterConfig.AttachmentStrategy attachmentStrategy, ESEmitterConfig.UpdateStrategy updateStrategy, int commitWithin, String embeddedFileFieldName, String apiKey, HttpClientConfig httpClientConfig) Creates an instance of aESEmitterConfigrecord class.- Parameters:
esUrl- the value for theesUrlrecord componentidField- the value for theidFieldrecord componentattachmentStrategy- the value for theattachmentStrategyrecord componentupdateStrategy- the value for theupdateStrategyrecord componentcommitWithin- the value for thecommitWithinrecord componentembeddedFileFieldName- the value for theembeddedFileFieldNamerecord componentapiKey- the value for theapiKeyrecord componenthttpClientConfig- the value for thehttpClientConfigrecord component
-
-
Method Details
-
load
- Throws:
TikaConfigException
-
toString
Overrides the record default to preventapiKeyleaking into logs. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
esUrl
Returns the value of theesUrlrecord component.- Returns:
- the value of the
esUrlrecord component
-
idField
Returns the value of theidFieldrecord component.- Returns:
- the value of the
idFieldrecord component
-
attachmentStrategy
Returns the value of theattachmentStrategyrecord component.- Returns:
- the value of the
attachmentStrategyrecord component
-
updateStrategy
Returns the value of theupdateStrategyrecord component.- Returns:
- the value of the
updateStrategyrecord component
-
commitWithin
public int commitWithin()Returns the value of thecommitWithinrecord component.- Returns:
- the value of the
commitWithinrecord component
-
embeddedFileFieldName
Returns the value of theembeddedFileFieldNamerecord component.- Returns:
- the value of the
embeddedFileFieldNamerecord component
-
apiKey
Returns the value of theapiKeyrecord component.- Returns:
- the value of the
apiKeyrecord component
-
httpClientConfig
Returns the value of thehttpClientConfigrecord component.- Returns:
- the value of the
httpClientConfigrecord component
-