mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 22:43:12 +00:00
Revert "[DS-3695] Replace removed default schema settings with query parameters."
This reverts commit 69fcb0ebce
.
This commit is contained in:
@@ -971,15 +971,6 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
|||||||
.setFacetMinCount(1);
|
.setFacetMinCount(1);
|
||||||
addAdditionalSolrYearCores(solrQuery);
|
addAdditionalSolrYearCores(solrQuery);
|
||||||
|
|
||||||
// Can no longer set default field in schema
|
|
||||||
if (null == solrQuery.get("df")) {
|
|
||||||
solrQuery.add("df", "id");
|
|
||||||
}
|
|
||||||
// Can no longer set default match operator in schema
|
|
||||||
if (null == solrQuery.get("q.op")) {
|
|
||||||
solrQuery.add("q.op", "AND");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the date facet if present
|
// Set the date facet if present
|
||||||
if (dateType != null) {
|
if (dateType != null) {
|
||||||
solrQuery.setParam("facet.date", "time")
|
solrQuery.setParam("facet.date", "time")
|
||||||
|
@@ -32,16 +32,8 @@ public class DSpaceSolrSearch {
|
|||||||
|
|
||||||
public static SolrDocumentList query(SolrClient server, SolrQuery solrParams)
|
public static SolrDocumentList query(SolrClient server, SolrQuery solrParams)
|
||||||
throws DSpaceSolrException, IOException {
|
throws DSpaceSolrException, IOException {
|
||||||
solrParams.addSort("item.id", ORDER.asc);
|
|
||||||
// No longer can set default search field in the schema
|
|
||||||
if (null == solrParams.get("df")) {
|
|
||||||
solrParams.set("df", "item.handle");
|
|
||||||
}
|
|
||||||
// No longer can set default match operator in the schema
|
|
||||||
if (null == solrParams.get("q.op")) {
|
|
||||||
solrParams.set("q.op", "OR");
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
|
solrParams.addSort("item.id", ORDER.asc);
|
||||||
QueryResponse response = server.query(solrParams);
|
QueryResponse response = server.query(solrParams);
|
||||||
return response.getResults();
|
return response.getResults();
|
||||||
} catch (SolrServerException ex) {
|
} catch (SolrServerException ex) {
|
||||||
|
Reference in New Issue
Block a user