> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Forked Apache Tika Parser Stage

export const schema = {
  "type": "object",
  "title": "Forked Apache Tika",
  "description": "A simplified Apache Tika parser more geared towards an Enterprise Search crawl where all documents are parsed in a forked Java Virtual Machine. If memory issues occur during the parse, such as an Out Of Memory condition, the connector job will be unaffected.",
  "required": ["type"],
  "properties": {
    "id": {
      "type": "string",
      "title": "Parser ID",
      "default": "91fcd905-2320-435f-9b3b-c9f7e1aae937"
    },
    "label": {
      "type": "string",
      "title": "Label",
      "description": "A label for this Parser Stage",
      "maxLength": 255
    },
    "enabled": {
      "type": "boolean",
      "title": "Enable this Parser Stage",
      "default": true
    },
    "mediaTypes": {
      "type": "array",
      "title": "Media Types to match",
      "description": "Documents with a media type on this list will be matched by this parser stage. See inheritMediaTypes / use default media types for more.",
      "items": {
        "type": "string",
        "pattern": "^[^\\/]+\\/[^\\/]+$",
        "format": "rfc2646"
      }
    },
    "inheritMediaTypes": {
      "type": "boolean",
      "title": "Match default media types in this Parser Stage",
      "description": "Each parser stage has a built-in list of media types it handles by default. If this setting is true, that list will be used along with any optional additional types provided in the mediaTypes list. If this setting is false, this stage will only be selected for media types in the mediaTypes list, and the mediaTypes list becomes a mandatory property which must have at least one valid media type.",
      "default": true
    },
    "pathPatterns": {
      "type": "array",
      "title": "File names to parse",
      "description": "Specify a file name or pattern that must be matched for this parser stage to run. Forward slashes (\"/\") are used to join names of files inside archives with the archive name.",
      "items": {
        "type": "object",
        "properties": {
          "syntax": {
            "type": "string",
            "title": "Pattern type",
            "description": "glob uses bash shell-style wildcards; regex uses Java (PCRE-style) regex",
            "enum": ["glob", "regex"],
            "default": "glob"
          },
          "pattern": {
            "type": "string",
            "title": "File name or pattern",
            "description": "e.g.: \"z.txt\" or \"*.md\" or \"/a/*/b/f.txt\" for glob; \"z.txt$\" or \".*\\.txt$\" or \"^/a/[^\\/]*/b/f.txt$\" for regex"
          }
        }
      }
    },
    "errorHandling": {
      "type": "string",
      "title": "Error Handling",
      "enum": ["ignore", "log", "fail", "mark"],
      "default": "mark"
    },
    "outputFieldPrefix": {
      "type": "string",
      "title": "Prefix parsed fields with",
      "description": "Fields extracted by this parser will be prefixed with this string. The remainder of the field name will be as detected in the stream",
      "maxLength": 20,
      "pattern": "^$|^[A-Za-z_][A-Za-z0-9_\\-\\.]+$"
    },
    "includeImages": {
      "type": "boolean",
      "title": "Include images",
      "default": false
    },
    "addFailedDocs": {
      "type": "boolean",
      "title": "Add failed documents",
      "default": false
    },
    "contentEncoding": {
      "type": "string",
      "title": "Content transport encoding of the content (per RFC1341)",
      "enum": ["binary", "base64"],
      "default": "binary"
    },
    "extractHtmlLinks": {
      "type": "boolean",
      "title": "Extract XHTML links",
      "description": "Collect links explicitly declared in document structure (e.g. using HTML tags, bookmarks, etc)",
      "default": true
    },
    "maxBytesReturned": {
      "type": "integer",
      "title": "Max bytes returned",
      "description": "Sets the maximum amount of bytes that can be returned from the parser.",
      "default": 100000000
    },
    "parseTimeoutMs": {
      "type": "integer",
      "title": "Parse timeout (ms)",
      "description": "The maximum amount of time in milliseconds that a single parse can take.",
      "default": 60000
    },
    "excludeContentTypes": {
      "type": "array",
      "title": "Content types to exclude",
      "description": "List of content types to exclude from parsing",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "zipBombCompressionRatio": {
      "type": "integer",
      "title": "Maximum input-to-output byte ratio",
      "description": "Maximum number of output bytes fusion will generate per input byte. If you are indexing highly compressed files, you may increase this value to avoid triggering 'Zip Bomb' detection",
      "default": 200
    },
    "zipBombMaxDepth": {
      "type": "integer",
      "title": "Maximum nesting depth",
      "description": "Returns the maximum XML element nesting level. If you are indexing highly nested files, you may increase this value to avoid triggering 'Zip Bomb' detection",
      "default": 200
    },
    "zipBombMaxPackageEntryDepth": {
      "type": "integer",
      "title": "Maximum package entry depth",
      "description": "Sets the maximum package entry nesting level. If you are indexing highly nested files, you may increase this value to avoid triggering 'Zip Bomb' detection",
      "default": 20
    },
    "type": {
      "type": "string",
      "enum": ["tikafork"],
      "default": "tikafork"
    }
  },
  "additionalProperties": false,
  "category": "Other",
  "categoryPriority": 1,
  "unsafe": false
};

export const SchemaParamFields = ({schema}) => {
  const sanitize = str => {
    if (typeof str !== "string") return str;
    return str.replace(/^"(.*)"$/s, "$1").replace(/\\/g, "").replace(/"/g, "'");
  };
  const formatDescription = str => {
    const s = sanitize(str);
    return (/[.!?]\)*$/).test(s) ? s : `${s}.`;
  };
  const {description, properties = {}, required: requiredProps = []} = schema;
  const visibleProps = useMemo(() => Object.entries(properties).filter(([, prop]) => !prop.hints?.includes("hidden")), [properties]);
  return <div>
      {description && <p>{formatDescription(description)}</p>}

      {visibleProps.map(([name, prop]) => {
    const isRequired = requiredProps.includes(name);
    const hasDefault = prop.default !== undefined;
    const rawDefault = prop.default;
    const isComplexDefault = hasDefault && (typeof rawDefault === "object" || typeof rawDefault === "string" && (rawDefault.length > 20 || rawDefault.includes('"')));
    const fieldProps = {
      key: name,
      body: prop.title || name,
      type: prop.type,
      ...prop.title && ({
        post: [<><span className="text-stone-400 dark:text-stone-500">API property: </span>{name}</>]
      }),
      ...isRequired && ({
        required: true
      }),
      ...!isComplexDefault && hasDefault ? {
        default: sanitize(String(rawDefault))
      } : {}
    };
    const isObject = prop.type === "object" && prop.properties;
    const isArrayOfObjects = prop.type === "array" && prop.items?.type === "object" && prop.items.properties;
    return <ParamField {...fieldProps}>
            {prop.description && <p>{formatDescription(prop.description)}</p>}

            {isComplexDefault && <div className="flex">
                <p>
                  <strong>Default:</strong>
                </p>
                <pre className="!my-0">
                  <code>
                    {JSON.stringify(rawDefault, null, 2)}
                  </code>
                </pre>
              </div>}

            {isArrayOfObjects && <div className="flex">
              <p>
                <strong>Object attributes:</strong>
              </p>
              <pre className="!my-0">
                <code>
                  {'{\n'}
                  {Object.entries(prop.items.properties).map(([iname, iprop]) => <>
                      {`  ${iname}`}
                      {prop.items?.required?.includes(iname) && <span style={{
      color: 'red'
    }}> required</span>}
                      {`: {\n    display name: ${sanitize(iprop.title || '')}\n    type: ${iprop.type}\n  }\n`}
                    </>)}
                  {'}'}
                </code>
              </pre>
              </div>}

            {isObject && <Expandable title="properties">
                <SchemaParamFields schema={{
      properties: prop.properties,
      required: prop.required
    }} />
              </Expandable>}
          </ParamField>;
  })}
    </div>;
};

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/4/fusion-server/reference/parser-stages/forked-apache-tika-parser

[mintlify link]: https://doc.lucidworks.com/docs/4/fusion-server/reference/parser-stages/forked-apache-tika-parser

[old doc.lw link]: https://doc.lucidworks.com/fusion/5.9/367

A simplified Apache Tika parser more geared towards an Enterprise Search crawl where all documents are parsed in a forked Java Virtual Machine. If memory issues occur during the parse, such as an Out Of Memory condition, the connector job will be unaffected.

<Tip>
  **Important**

  The Forked Apache Tika parser is only available on Fusion 4.2.4+. To use this parser, you will be required to **Upgrade to Fusion 4.x** to the latest version of Fusion.

  <Accordion title="Upgrade to Fusion 4.x">
    When you have a Fusion-based search application running, at some point it might be necessary to upgrade to a later version of Fusion. We provide a migrator tool to simplify the upgrade process.

    <Tip>See the [release history](/docs/4/fusion-server/release-notes/4.2.0-release-notes) to find out what is new, including which versions of Solr, Spark, and ZooKeeper are bundled with each Fusion release.</Tip>

    The migrator transfers over *most* of the objects that make up your search application, all configurations and customizations for your application, and all data in collections in the application.

    <Note>In some cases, manual steps are required for objects that the migrator cannot handle automatically. We give you instructions and guidance about what might be required. You should also review the log of the upgrade in `/opt/fusion/x.y.z/var/upgrade/tmp/migrator.log` (on Unix) or `C:\lucidworks\var\fusion\x.y.z\upgrade\tmp\migrator.log` (on Windows). The x.y.z directory is for the Fusion version that you are migrating *from*.</Note>

    <LwTemplate />

    ## Key points

    Following are some key points about upgrading Fusion:

    * **Migration involves down time.** The upgrade process involves multiple starts and stops of Fusion services. Please plan accordingly, especially in terms of disabling external load balancers or monitors that might react adversely to the starts and stops.
    * **Current deployment is preserved.** Upgrades preserve the current Fusion deployment, copying information over from the current deployment to the new one. This provides a rapid roll-back option if you encounter problems during the upgrade process.
    * **If the upgrade fails.** If an upgrade fails, there is a procedure for dealing with that.

    ## Supported upgrade sequences

    <Check>Only specific version-to-version upgrade sequences are supported. Some upgrades require multiple steps.</Check>

    These upgrade sequences are supported.

    ### Upgrades to the current version

    * **3.1.x to 4.2.y.** From any 3.1.x version to 4.2.6 SP1 (one step, using the migrator)
    * **4.0.x to 4.2.y.** From any 4.0.x version to 4.2.6 SP1 (one step, using the migrator)
    * **4.1.x to 4.2.y.** From any 4.1.x version to 4.2.6 SP1 (one step, using the migrator)

    For links to these procedures, see [Per-version instruction sets](#per-version-instruction-sets).

    ### Upgrades to prior versions

    Using the migrator:

    * **3.1.x to 4.0.y.** From 3.1.5 directly to 4.0.2 (one step)

      For more information, see Upgrade Fusion 3.1.x to 4.0.y.
    * **4.0.x to 4.0.y.** From 4.0.0 or 4.0.1 to 4.0.2 (one step)

      For more information, see Upgrade Fusion Server 4.0.x to 4.0.y.
    * **3.1.x to 4.1.y.** From any 3.1.x version to 4.1.3 (one step, using the migrator)

      For more information, see Upgrade Fusion Server 3.1.x to 4.1.y.
    * **4.0.x to 4.1.y.** From 4.0.2 to 4.1.3 (one step, using the migrator)

      For more information, see Upgrade Fusion Server 4.0.x to 4.1.y.
    * **4.1.x to 4.1.y.** From 4.1.0 to 4.1.3 (one step, using the migrator)

      For more information, see Upgrade Fusion Server 4.1.x to 4.1.y.

    ### Example

    For example, to upgrade from Fusion 3.0.1 to Fusion Server 4.2.5, you would perform the following upgrades (both of them using the migrator):

    1. Upgrade from Fusion 3.0.1 to Fusion 3.1.5
    2. Upgrade from Fusion 3.1.5 to Fusion Server 4.2.5

    ## Per-version instruction sets

    To upgrade to a later version of Fusion from an existing installation requires
    transferring over all configurations and data from your existing Fusion installation to the
    new version.

    **How to upgrade from Fusion 3.1.x to Fusion Server 4.2.y**

    Perform the steps in this article:

    **Upgrade from Fusion Server 3.1.x to 4.2.y** - Run a migrator to upgrade from Fusion Server 3.1.x to 4.2.y.

    **How to upgrade from Fusion 4.0.x to Fusion Server 4.2.y**

    Perform the steps in this article:

    **Upgrade from Fusion Server 4.0.x to 4.2.y** - Run a migrator to upgrade from Fusion Server 4.0.x to 4.2.y.

    **How to upgrade from Fusion 4.1.x to Fusion Server 4.2.y**

    Perform the steps in this article:

    **Upgrade from Fusion Server 4.1.x to 4.2.y** - Run a migrator to upgrade from Fusion Server 4.1.x to 4.2.y.

    **How to upgrade from Fusion 4.2.x to Fusion Server 4.2.y**

    Perform the steps in this article:

    **Upgrade from Fusion Server 4.2.x to 4.2.y** - Run a migrator to upgrade from Fusion Server 4.2.x to 4.2.y.
  </Accordion>
</Tip>

<Tip>
  When entering configuration values in the UI, use *unescaped* characters, such as `\t` for the tab character. When entering configuration values in the API, use *escaped* characters, such as `\\t` for the tab character.
</Tip>

<SchemaParamFields schema={schema} />
