diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 2200378598b..b1b792008fc 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -239,6 +239,9 @@ Other Changes * SOLR-6275: Improve accuracy of QTime reporting (Ramkumar Aiyengar) +* SOLR-7174: DIH should reset TikaEntityProcessor so that it is capable + of re-use (Alexandre Rafalovitch , Gary Taylor via Noble Paul) + ================== 5.0.0 ================== Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release. diff --git a/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java b/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java index 1636f0aaf05..575bf31f2d7 100644 --- a/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java +++ b/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java @@ -67,6 +67,12 @@ public class TikaEntityProcessor extends EntityProcessorBase { static final String AUTO_PARSER = "org.apache.tika.parser.AutoDetectParser"; private String htmlMapper; + @Override + public void init(Context context) { + super.init(context); + done = false; + } + @Override protected void firstInit(Context context) { super.firstInit(context); @@ -102,7 +108,6 @@ public class TikaEntityProcessor extends EntityProcessorBase { if(parser == null) { parser = AUTO_PARSER; } - done = false; } @Override