From 86534a56f7c23c05be032a80e4a26b5b459017a3 Mon Sep 17 00:00:00 2001 From: reger Date: Mon, 27 Feb 2017 23:00:46 +0100 Subject: [PATCH] fixed ReindexSolrBusyThread new and unexpected repeat of same query with low number of found documents - by adding additional end condition to remove processed query with number of found docs <= process-chunck-size. Noticed on query h4_txt:[* TO *], found 21, process 21, call of commit happend but on next cycle same query again 21 docs found (while h4_txt was removed from schema and committed inputdocuments). --- source/net/yacy/search/index/ReindexSolrBusyThread.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/net/yacy/search/index/ReindexSolrBusyThread.java b/source/net/yacy/search/index/ReindexSolrBusyThread.java index 2482e4e37..4be6d6e95 100644 --- a/source/net/yacy/search/index/ReindexSolrBusyThread.java +++ b/source/net/yacy/search/index/ReindexSolrBusyThread.java @@ -144,6 +144,9 @@ import org.apache.solr.common.SolrInputDocument; Switchboard.getSwitchboard().index.putDocument(idoc); processed++; } + if (xdocs.size() >= docstoreindex) { // number processed docs >= found docs -> end condition for this query as no more docs avail- + querylist.delete(currentquery); // 2017-02-27 added on occurence of 21 docs found 21 processed but somehow on next call 21 docs again found (some commit issue ??) + } } } catch (final IOException ex) { ConcurrentLog.warn("MIGRATION-REINDEX", "remove following query from list due to error, q=" + currentquery);