Tika
  1. Tika
  2. TIKA-242

Incremental configuration AutoDetectParser

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 0.3
    • Fix Version/s: None
    • Component/s: config
    • Labels:
      None

      Description

      The AutoDetectParser accepts one totally new configuration or no configuration. For the latter case a default configuration is used. It would be nice if the former case is a configuration on top of the default configuration.

        Activity

        Hide
        Aaron Kaplan added a comment -

        Here's a patch that implements this. It adds an optional boolean argument "fallback" to each of the non-default TikaConfig constructors. If fallback is true, then the configuration file is read, but for any mime type that is not explicitly specified in the configuration file, the default behavior is used.

        Show
        Aaron Kaplan added a comment - Here's a patch that implements this. It adds an optional boolean argument "fallback" to each of the non-default TikaConfig constructors. If fallback is true, then the configuration file is read, but for any mime type that is not explicitly specified in the configuration file, the default behavior is used.
        Hide
        Jukka Zitting added a comment -

        I'm wondering if this would be better handled with the existing fallback parser support:

        TikaConfig config = new TikaConfig("my-custom-tika-config.xml");
        AutoDetectParser parser = new AutoDetectParser(config);
        parser.setFallback(new AutoDetectParser());

        Of course this only covers the parser classes and not the mime type registry, but we could perhaps do something similar also with the Detector interface to cover that part.

        Show
        Jukka Zitting added a comment - I'm wondering if this would be better handled with the existing fallback parser support: TikaConfig config = new TikaConfig("my-custom-tika-config.xml"); AutoDetectParser parser = new AutoDetectParser(config); parser.setFallback(new AutoDetectParser()); Of course this only covers the parser classes and not the mime type registry, but we could perhaps do something similar also with the Detector interface to cover that part.
        Hide
        Jukka Zitting added a comment -

        Resolving as a duplicate of the auto-loading mechanisms we added for detectors and parsers and the multiple type database support added in TIKA-746. The use case of this issue is already covered by those changes.

        Show
        Jukka Zitting added a comment - Resolving as a duplicate of the auto-loading mechanisms we added for detectors and parsers and the multiple type database support added in TIKA-746 . The use case of this issue is already covered by those changes.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jan Goyvaerts
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development