Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tika Wiki" for change notification.
The "Troubleshooting Tika" page has been changed by NickBurch: https://wiki.apache.org/tika/Troubleshooting%20Tika?action=diff&rev1=6&rev2=7 === Tika Server === Go to `http://localhost:9998/parsers` === Tika Facade === + {{{ - {{{// Get your Tika object, eg + // Get your Tika object, eg Tika tika = new Tika(); - // Call toString() to get the version - String version = tika.toString();}}} + // Get the root parser + CompositeParser parser = (CompositeParser)parser.getParser(); + // Fetch the types it supports + for (MediaType type : parser.getSupportedTypes(new ParseContext())) { + String typeStr = type.toString(); + } + // Fetch the parsers that make it up (note - may need to recurse if any are a CompositeParser too) + for (Parser p : parser.getAllComponentParsers()) { + String parserName = p.getClass().getName(); + } + }}} === Tika Java classes === + {{{ - {{{// Get your Tika Config, eg + // Get your Tika Config, eg TikaConfig config = TikaConfig.getDefaultConfig(); - // Go via the Tika Facade - String version = (new Tika(config)).toString();}} + // Get the root parser + CompositeParser parser = (CompositeParser)parser.getParser(); + // Fetch the types it supports + for (MediaType type : parser.getSupportedTypes(new ParseContext())) { + String typeStr = type.toString(); + } + // Fetch the parsers that make it up (note - may need to recurse if any are a CompositeParser too) + for (Parser p : parser.getAllComponentParsers()) { + String parserName = p.getClass().getName(); + if (p instanceof CompositeParser) { + // Check child ones too + } + } + }}} == Identifying what Detectors your Tika install supports == === Tika App === @@ -124, +147 @@ === Tika Server === Go to `http://localhost:9998/detectors` === Tika Facade === - ''todo'' + {{{ + // Get your Tika object, eg + Tika tika = new Tika(); + // Get the root detector + CompositeDetector detector = (CompositeDetector)parser.getDetector(); + // Fetch the detectors that make it up (note - may need to recurse if any are a CompositeDetector too) + for (Detector d : parser.getDetectors()) { + String detectorName = d.getClass().getName(); + } + }}} === Tika Java classes === - ''todo'' + {{{ + // Get your Tika Config, eg + TikaConfig config = TikaConfig.getDefaultConfig(); + // Get the root detector + CompositeDetector detector = (CompositeDetector)parser.getDetector(); + // Fetch the detectors that make it up (note - may need to recurse if any are a CompositeDetector too) + for (Detector d : parser.getDetectors()) { + String detectorName = d.getClass().getName(); + if (d instanceof CompositeDetector) { + // Check child ones too + } + } + }}} == Identifying if any Parsers failed to be loaded == + ''TODO describe how to use a ServiceLoader.LoadErrorHandler to get reports'' == Identifying if any Detectors failed to be loaded == + ''TODO describe how to use a ServiceLoader.LoadErrorHandler to get reports''
