# Schema for the configuration files of the Search API attachments module.

search_api_attachments.admin_config:
  type: config_object
  label: 'Search API attachments settings'
  mapping:
    extraction_method:
      type: string
      label: 'Extractor Plugin ID'
    tika_extractor_configuration:
      type: mapping
      label: 'Tika extractor configuration'
      mapping:
        java_path:
          type: string
          label: 'Path to java executable'
        tika_path:
          type: string
          label: 'Path to Tika .jar file'
    tika_server_extractor_configuration:
      type: mapping
      label: 'Tika server extractor configuration'
      mapping:
        scheme:
          type: string
          label: 'The HTTP protocol to use for sending queries'
        host:
          type: string
          label: 'The host name or IP of the Tika server'
        port:
          type: string
          label: 'The port of the Tika server'
        timeout:
          type: integer
          label: 'Timeout for Tika queries'
    docconv_extractor_configuration:
      type: mapping
      label: 'Docconv extractor configuration'
      mapping:
        docconv_path:
          type: string
          label: 'Path to the docconv binary'
    solr_extractor_configuration:
      type: mapping
      label: 'Solr extractor configuration'
      mapping:
        solr_server:
          type: string
          label: 'Solr server'
    python_pdf2txt_extractor_configuration:
      type: mapping
      label: 'Python Pdf2txt extractor configuration'
      mapping:
        python_path:
          type: string
          label: 'Path to python executable'
        python_pdf2txt_script:
          type: string
          label: 'Full path to the python pdf2txt script'
    pdftotext_extractor_configuration:
      type: ignore
      label: 'Pdftotext extractor configuration'
    preserve_cache:
      type: boolean
      label: 'Preserve cached extractions across cache clears.'
    read_text_files_directly:
      type: boolean
      label: 'Get contents of text attachments directly using file_get_contents.'
field.formatter.settings.file_extracted_text:
  type: mapping
  label: 'File extracted text'
  mapping:
    excluded_extensions:
      type: string
      label: 'Excluded file extensions'
    max_filesize:
      type: string
      label: 'Maximum upload size'
    excluded_private:
      type: integer
      label: 'Exclude private files'
