From ab1201fdfd9c1ec72c0b6013ec8732cca7ab0a10 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Tue, 3 Sep 2013 12:22:29 +0200 Subject: [PATCH] fixed wrong facet count --- source/net/yacy/search/query/QueryParams.java | 2 ++ source/net/yacy/search/query/SearchEvent.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/search/query/QueryParams.java b/source/net/yacy/search/query/QueryParams.java index 588a80ef7..6fcdd6ef5 100644 --- a/source/net/yacy/search/query/QueryParams.java +++ b/source/net/yacy/search/query/QueryParams.java @@ -384,6 +384,7 @@ public final class QueryParams { private SolrQuery solrTextQuery(final boolean getFacets, final boolean excludeintext_image) { if (this.cachedQuery != null) { this.cachedQuery.setStart(this.offset); + if (!getFacets) this.cachedQuery.setFacet(false); return this.cachedQuery; } if (this.queryGoal.getIncludeStrings().size() == 0) return null; @@ -408,6 +409,7 @@ public final class QueryParams { private SolrQuery solrImageQuery(boolean getFacets) { if (this.cachedQuery != null) { this.cachedQuery.setStart(this.offset); + if (!getFacets) this.cachedQuery.setFacet(false); return this.cachedQuery; } if (this.queryGoal.getIncludeStrings().size() == 0) return null; diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.java index 4224ab8b7..6bf552bfa 100644 --- a/source/net/yacy/search/query/SearchEvent.java +++ b/source/net/yacy/search/query/SearchEvent.java @@ -1356,7 +1356,7 @@ public final class SearchEvent { int nextitems = item - this.localsolroffset + this.query.itemsPerPage; // example: suddenly switch to item 60, just 10 had been shown, 20 loaded. if (this.localsolrsearch != null && this.localsolrsearch.isAlive()) {try {this.localsolrsearch.join();} catch (final InterruptedException e) {}} if (!Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.DEBUG_SEARCH_LOCAL_SOLR_OFF, false)) { - this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.query.solrQuery(this.query.contentdom, this.localsolroffset == 0, this.excludeintext_image), this.localsolroffset, nextitems, null /*this peer*/, Switchboard.urlBlacklist); + this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.query.solrQuery(this.query.contentdom, false, this.excludeintext_image), this.localsolroffset, nextitems, null /*this peer*/, Switchboard.urlBlacklist); } this.localsolroffset += nextitems; } @@ -1377,7 +1377,7 @@ public final class SearchEvent { if (this.localsolrsearch == null || !this.localsolrsearch.isAlive() && this.local_solr_stored.get() > this.localsolroffset && (item + 1) % this.query.itemsPerPage == 0) { // at the end of a list, trigger a next solr search if (!Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.DEBUG_SEARCH_LOCAL_SOLR_OFF, false)) { - this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.query.solrQuery(this.query.contentdom, this.localsolroffset == 0, this.excludeintext_image), this.localsolroffset, this.query.itemsPerPage, null /*this peer*/, Switchboard.urlBlacklist); + this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.query.solrQuery(this.query.contentdom, false, this.excludeintext_image), this.localsolroffset, this.query.itemsPerPage, null /*this peer*/, Switchboard.urlBlacklist); } this.localsolroffset += this.query.itemsPerPage; }