diff --git a/source/net/yacy/cora/services/federated/solr/AbstractSolrConnector.java b/source/net/yacy/cora/services/federated/solr/AbstractSolrConnector.java index cba649875..530e63888 100644 --- a/source/net/yacy/cora/services/federated/solr/AbstractSolrConnector.java +++ b/source/net/yacy/cora/services/federated/solr/AbstractSolrConnector.java @@ -46,6 +46,13 @@ public abstract class AbstractSolrConnector implements SolrConnector { catchallQuery.setRows(1); catchallQuery.setStart(0); } + public final static SolrQuery catchSuccessQuery = new SolrQuery(); + static { + catchallQuery.setQuery("-" + YaCySchema.failreason_t.name() + ":[* TO *]"); + catchallQuery.setFields(YaCySchema.id.name()); + catchallQuery.setRows(1); + catchallQuery.setStart(0); + } private final static int pagesize = 10; @Override diff --git a/source/net/yacy/cora/services/federated/solr/SolrServerConnector.java b/source/net/yacy/cora/services/federated/solr/SolrServerConnector.java index 9b91faf73..856a57346 100644 --- a/source/net/yacy/cora/services/federated/solr/SolrServerConnector.java +++ b/source/net/yacy/cora/services/federated/solr/SolrServerConnector.java @@ -92,7 +92,7 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen @Override public long getSize() { try { - final QueryResponse rsp = query(AbstractSolrConnector.catchallQuery); + final QueryResponse rsp = query(AbstractSolrConnector.catchSuccessQuery); if (rsp == null) return 0; final SolrDocumentList docs = rsp.getResults(); if (docs == null) return 0;