|
|
|
@ -61,6 +61,7 @@ public abstract class AbstractSolrConnector implements SolrConnector {
|
|
|
|
|
//catchSuccessQuery.setQuery("-" + CollectionSchema.failreason_t.getSolrFieldName() + ":[* TO *]");
|
|
|
|
|
catchSuccessQuery.setQuery("*:*"); // failreason_t is only available for core collection1
|
|
|
|
|
catchSuccessQuery.setFields(CollectionSchema.id.getSolrFieldName());
|
|
|
|
|
catchSuccessQuery.clearSorts();
|
|
|
|
|
catchSuccessQuery.setRows(0);
|
|
|
|
|
catchSuccessQuery.setStart(0);
|
|
|
|
|
}
|
|
|
|
@ -186,6 +187,7 @@ public abstract class AbstractSolrConnector implements SolrConnector {
|
|
|
|
|
params.setRows(count);
|
|
|
|
|
params.setStart(offset);
|
|
|
|
|
params.setFacet(false);
|
|
|
|
|
params.clearSorts();
|
|
|
|
|
//params.addSortField( "price", SolrQuery.ORDER.asc );
|
|
|
|
|
|
|
|
|
|
if (fields.length > 0) params.setFields(fields);
|
|
|
|
@ -206,6 +208,7 @@ public abstract class AbstractSolrConnector implements SolrConnector {
|
|
|
|
|
params.setRows(0);
|
|
|
|
|
params.setStart(0);
|
|
|
|
|
params.setFacet(false);
|
|
|
|
|
params.clearSorts();
|
|
|
|
|
params.setFields(CollectionSchema.id.getSolrFieldName());
|
|
|
|
|
|
|
|
|
|
// query the server
|
|
|
|
@ -229,6 +232,7 @@ public abstract class AbstractSolrConnector implements SolrConnector {
|
|
|
|
|
params.setRows(0);
|
|
|
|
|
params.setStart(0);
|
|
|
|
|
params.setFacet(false);
|
|
|
|
|
params.clearSorts();
|
|
|
|
|
params.setFields(CollectionSchema.id.getSolrFieldName());
|
|
|
|
|
|
|
|
|
|
// query the server
|
|
|
|
@ -257,6 +261,7 @@ public abstract class AbstractSolrConnector implements SolrConnector {
|
|
|
|
|
params.setFacetLimit(maxresults);
|
|
|
|
|
params.setFacetSort(FacetParams.FACET_SORT_COUNT);
|
|
|
|
|
params.setFields(fields);
|
|
|
|
|
params.clearSorts();
|
|
|
|
|
for (String field: fields) params.addFacetField(field);
|
|
|
|
|
|
|
|
|
|
// query the server
|
|
|
|
@ -279,6 +284,7 @@ public abstract class AbstractSolrConnector implements SolrConnector {
|
|
|
|
|
assert key.length() == 12;
|
|
|
|
|
// construct query
|
|
|
|
|
query.setQuery("{!raw f=" + CollectionSchema.id.getSolrFieldName() + "}" + key);
|
|
|
|
|
query.clearSorts();
|
|
|
|
|
query.setRows(1);
|
|
|
|
|
query.setStart(0);
|
|
|
|
|
if (fields.length > 0) query.setFields(fields);
|
|
|
|
|