mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
fixed wrong facet count
This commit is contained in:
parent
049c3b3f2e
commit
ab1201fdfd
|
@ -384,6 +384,7 @@ public final class QueryParams {
|
||||||
private SolrQuery solrTextQuery(final boolean getFacets, final boolean excludeintext_image) {
|
private SolrQuery solrTextQuery(final boolean getFacets, final boolean excludeintext_image) {
|
||||||
if (this.cachedQuery != null) {
|
if (this.cachedQuery != null) {
|
||||||
this.cachedQuery.setStart(this.offset);
|
this.cachedQuery.setStart(this.offset);
|
||||||
|
if (!getFacets) this.cachedQuery.setFacet(false);
|
||||||
return this.cachedQuery;
|
return this.cachedQuery;
|
||||||
}
|
}
|
||||||
if (this.queryGoal.getIncludeStrings().size() == 0) return null;
|
if (this.queryGoal.getIncludeStrings().size() == 0) return null;
|
||||||
|
@ -408,6 +409,7 @@ public final class QueryParams {
|
||||||
private SolrQuery solrImageQuery(boolean getFacets) {
|
private SolrQuery solrImageQuery(boolean getFacets) {
|
||||||
if (this.cachedQuery != null) {
|
if (this.cachedQuery != null) {
|
||||||
this.cachedQuery.setStart(this.offset);
|
this.cachedQuery.setStart(this.offset);
|
||||||
|
if (!getFacets) this.cachedQuery.setFacet(false);
|
||||||
return this.cachedQuery;
|
return this.cachedQuery;
|
||||||
}
|
}
|
||||||
if (this.queryGoal.getIncludeStrings().size() == 0) return null;
|
if (this.queryGoal.getIncludeStrings().size() == 0) return null;
|
||||||
|
|
|
@ -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.
|
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 (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)) {
|
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;
|
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) {
|
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
|
// at the end of a list, trigger a next solr search
|
||||||
if (!Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.DEBUG_SEARCH_LOCAL_SOLR_OFF, false)) {
|
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;
|
this.localsolroffset += this.query.itemsPerPage;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user