Class AttachmentProcessor.Builder

All Implemented Interfaces:
WithJson<AttachmentProcessor.Builder>, ObjectBuilder<AttachmentProcessor>
Enclosing class:
AttachmentProcessor

public static class AttachmentProcessor.Builder extends ProcessorBase.AbstractBuilder<AttachmentProcessor.Builder> implements ObjectBuilder<AttachmentProcessor>
Builder for AttachmentProcessor.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • field

      public final AttachmentProcessor.Builder field(String value)
      Required - The field to get the base64 encoded field from.

      API name: field

    • ignoreMissing

      public final AttachmentProcessor.Builder ignoreMissing(@Nullable Boolean value)
      If true and field does not exist, the processor quietly exits without modifying the document.

      API name: ignore_missing

    • indexedChars

      public final AttachmentProcessor.Builder indexedChars(@Nullable Long value)
      The number of chars being used for extraction to prevent huge fields. Use -1 for no limit.

      API name: indexed_chars

    • indexedCharsField

      public final AttachmentProcessor.Builder indexedCharsField(@Nullable String value)
      Field name from which you can overwrite the number of chars being used for extraction.

      API name: indexed_chars_field

    • maxFieldBytes

      public final AttachmentProcessor.Builder maxFieldBytes(@Nullable String value)
      Maximum allowed size of the attachment field value in bytes: length of a string (if base64 in JSON, checked before base64 decoding) or byte array length for binary (for example, CBOR). If set to -1, there is no per-processor limit. The node setting ingest.attachment.max_field_size also applies.

      API name: max_field_bytes

    • properties

      public final AttachmentProcessor.Builder properties(List<String> list)
      Array of properties to select to be stored. Can be content, title, name, author, keywords, date, content_type, content_length, language.

      API name: properties

      Adds all elements of list to properties.

    • properties

      public final AttachmentProcessor.Builder properties(String value, String... values)
      Array of properties to select to be stored. Can be content, title, name, author, keywords, date, content_type, content_length, language.

      API name: properties

      Adds one or more values to properties.

    • targetField

      public final AttachmentProcessor.Builder targetField(@Nullable String value)
      The field that will hold the attachment information.

      API name: target_field

    • removeBinary

      public final AttachmentProcessor.Builder removeBinary(@Nullable Boolean value)
      If true, the binary field will be removed from the document

      API name: remove_binary

    • resourceName

      public final AttachmentProcessor.Builder resourceName(@Nullable String value)
      Field containing the name of the resource to decode. If specified, the processor passes this resource name to the underlying Tika library to enable Resource Name Based Detection.

      API name: resource_name

    • self

      protected AttachmentProcessor.Builder self()
      Specified by:
      self in class ProcessorBase.AbstractBuilder<AttachmentProcessor.Builder>
    • build

      public AttachmentProcessor build()
      Specified by:
      build in interface ObjectBuilder<AttachmentProcessor>
      Throws:
      NullPointerException - if some of the required fields are null.