Skip to content

Commit

Permalink
[#336] fix disable OCR when --ocr=false
Browse files Browse the repository at this point in the history
  • Loading branch information
bamthomas committed Feb 28, 2020
1 parent 48685a6 commit e74f924
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public IndexTask(final ElasticsearchSpewer spewer, final Publisher publisher, fi
Extractor extractor = new Extractor(new DocumentFactory().withIdentifier(new DigestIdentifier(Entity.HASHER.toString(), Charset.defaultCharset())));
extractor.setDigester(new UpdatableDigester(indexName, Entity.HASHER.toString()));

logger.info(String.valueOf(properties));
if ("false".equals(properties.getProperty("ocr"))) {
logger.info("disable OCR");
extractor.disableOcr();
}
consumer = new DocumentConsumer(spewer, extractor, this.parallelism);
if (propertiesProvider.getProperties().get(MAP_NAME_OPTION) != null) {
logger.info("report map enabled with name set to {}", propertiesProvider.getProperties().get(MAP_NAME_OPTION));
Expand Down

0 comments on commit e74f924

Please sign in to comment.