From 8f81bd633c98b65307358608484bdc8b505f4a06 Mon Sep 17 00:00:00 2001 From: Serafeim Chatzopoulos Date: Fri, 21 Jun 2024 16:08:10 +0300 Subject: [PATCH] Add debugQuery parameter --- .../api/controllers/DataSourceController.java | 5 +++-- .../api/controllers/OrganizationController.java | 5 +++-- .../openaire/api/controllers/ProjectController.java | 5 +++-- .../api/controllers/ResearchProductsController.java | 3 ++- .../openaire/api/dto/request/DataSourceRequest.java | 6 ++++++ .../openaire/api/dto/request/OrganizationRequest.java | 6 ++++++ .../eu/openaire/api/dto/request/ProjectRequest.java | 6 ++++++ .../api/dto/request/ResearchProductsRequest.java | 6 ++++++ .../request/validators/AllowableFieldsValidator.java | 8 -------- .../validators/ResearchProductsRequestValidator.java | 1 - .../eu/openaire/api/dto/request/validators/Utils.java | 11 +++++++++++ .../eu/openaire/api/dto/response/SearchHeader.java | 10 +++++++--- .../api/mappers/query/DataSourceRequestMapper.java | 4 ++-- .../api/mappers/query/OrganizationRequestMapper.java | 4 ++-- .../api/mappers/query/ProjectRequestMapper.java | 4 ++-- .../mappers/query/ResearchProductsRequestMapper.java | 4 ++-- .../api/mappers/response/ResponseHeaderMapper.java | 7 +++++-- .../eu/openaire/api/repositories/SolrRepository.java | 6 +++--- .../eu/openaire/api/services/DataSourceService.java | 6 +++--- .../eu/openaire/api/services/OrganizationService.java | 6 +++--- .../java/eu/openaire/api/services/ProjectService.java | 6 +++--- .../openaire/api/services/ResearchProductService.java | 6 +++--- .../java/eu/openaire/api/solr/SolrQueryParams.java | 6 +++--- 23 files changed, 84 insertions(+), 47 deletions(-) diff --git a/src/main/java/eu/openaire/api/controllers/DataSourceController.java b/src/main/java/eu/openaire/api/controllers/DataSourceController.java index dd22e21..71f9b45 100644 --- a/src/main/java/eu/openaire/api/controllers/DataSourceController.java +++ b/src/main/java/eu/openaire/api/controllers/DataSourceController.java @@ -3,6 +3,7 @@ package eu.openaire.api.controllers; import eu.dnetlib.dhp.oa.model.graph.Datasource; import eu.openaire.api.dto.request.DataSourceRequest; import eu.openaire.api.dto.request.validators.AllowableFieldsValidator; +import eu.openaire.api.dto.request.validators.Utils; import eu.openaire.api.dto.response.SearchResponse; import eu.openaire.api.errors.ErrorResponse; import eu.openaire.api.errors.exceptions.BadRequestException; @@ -62,10 +63,10 @@ public class DataSourceController @ApiResponse(responseCode = "500", content = { @Content(schema = @Schema(implementation = ErrorResponse.class), mediaType = "application/json") }) }) @GetMapping(value = "") - public Object search(@Valid @ParameterObject final DataSourceRequest request, BindingResult validationResult) { + public SearchResponse search(@Valid @ParameterObject final DataSourceRequest request, BindingResult validationResult) { if (validationResult.hasErrors()) { - throw new BadRequestException(AllowableFieldsValidator.getErrorMessage(validationResult.getAllErrors())); + throw new BadRequestException(Utils.getErrorMessage(validationResult.getAllErrors())); } return dataSourceService.search(request); diff --git a/src/main/java/eu/openaire/api/controllers/OrganizationController.java b/src/main/java/eu/openaire/api/controllers/OrganizationController.java index bb167b7..a8ec4e9 100644 --- a/src/main/java/eu/openaire/api/controllers/OrganizationController.java +++ b/src/main/java/eu/openaire/api/controllers/OrganizationController.java @@ -3,6 +3,7 @@ package eu.openaire.api.controllers; import eu.dnetlib.dhp.oa.model.graph.Organization; import eu.openaire.api.dto.request.OrganizationRequest; import eu.openaire.api.dto.request.validators.AllowableFieldsValidator; +import eu.openaire.api.dto.request.validators.Utils; import eu.openaire.api.dto.response.SearchResponse; import eu.openaire.api.errors.ErrorResponse; import eu.openaire.api.errors.exceptions.BadRequestException; @@ -62,10 +63,10 @@ public class OrganizationController @ApiResponse(responseCode = "500", content = { @Content(schema = @Schema(implementation = ErrorResponse.class), mediaType = "application/json") }) }) @GetMapping(value = "") - public Object search(@Valid @ParameterObject final OrganizationRequest request, BindingResult validationResult) { + public SearchResponse search(@Valid @ParameterObject final OrganizationRequest request, BindingResult validationResult) { if (validationResult.hasErrors()) { - throw new BadRequestException(AllowableFieldsValidator.getErrorMessage(validationResult.getAllErrors())); + throw new BadRequestException(Utils.getErrorMessage(validationResult.getAllErrors())); } return organizationService.search(request); diff --git a/src/main/java/eu/openaire/api/controllers/ProjectController.java b/src/main/java/eu/openaire/api/controllers/ProjectController.java index c9dbaa4..acf19e8 100644 --- a/src/main/java/eu/openaire/api/controllers/ProjectController.java +++ b/src/main/java/eu/openaire/api/controllers/ProjectController.java @@ -3,6 +3,7 @@ package eu.openaire.api.controllers; import eu.dnetlib.dhp.oa.model.graph.Project; import eu.openaire.api.dto.request.ProjectRequest; import eu.openaire.api.dto.request.validators.AllowableFieldsValidator; +import eu.openaire.api.dto.request.validators.Utils; import eu.openaire.api.dto.response.SearchResponse; import eu.openaire.api.errors.ErrorResponse; import eu.openaire.api.errors.exceptions.BadRequestException; @@ -62,10 +63,10 @@ public class ProjectController @ApiResponse(responseCode = "500", content = { @Content(schema = @Schema(implementation = ErrorResponse.class), mediaType = "application/json") }) }) @GetMapping(value = "") - public Object search(@Valid @ParameterObject final ProjectRequest request, BindingResult validationResult) { + public SearchResponse search(@Valid @ParameterObject final ProjectRequest request, BindingResult validationResult) { if (validationResult.hasErrors()) { - throw new BadRequestException(AllowableFieldsValidator.getErrorMessage(validationResult.getAllErrors())); + throw new BadRequestException(Utils.getErrorMessage(validationResult.getAllErrors())); } return projectService.search(request); diff --git a/src/main/java/eu/openaire/api/controllers/ResearchProductsController.java b/src/main/java/eu/openaire/api/controllers/ResearchProductsController.java index d3feb47..40a8e96 100644 --- a/src/main/java/eu/openaire/api/controllers/ResearchProductsController.java +++ b/src/main/java/eu/openaire/api/controllers/ResearchProductsController.java @@ -4,6 +4,7 @@ import eu.dnetlib.dhp.oa.model.graph.GraphResult; import eu.openaire.api.dto.request.ResearchProductsRequest; import eu.openaire.api.dto.request.validators.AllowableFieldsValidator; import eu.openaire.api.dto.request.validators.ResearchProductsRequestValidator; +import eu.openaire.api.dto.request.validators.Utils; import eu.openaire.api.dto.response.SearchResponse; import eu.openaire.api.errors.ErrorResponse; import eu.openaire.api.errors.exceptions.BadRequestException; @@ -69,7 +70,7 @@ public class ResearchProductsController public SearchResponse search(@Valid @ParameterObject final ResearchProductsRequest request, BindingResult validationResult) { if (validationResult.hasErrors()) { - throw new BadRequestException(AllowableFieldsValidator.getErrorMessage(validationResult.getAllErrors())); + throw new BadRequestException(Utils.getErrorMessage(validationResult.getAllErrors())); } return researchProductService.search(request); diff --git a/src/main/java/eu/openaire/api/dto/request/DataSourceRequest.java b/src/main/java/eu/openaire/api/dto/request/DataSourceRequest.java index 184ddae..7921ebf 100644 --- a/src/main/java/eu/openaire/api/dto/request/DataSourceRequest.java +++ b/src/main/java/eu/openaire/api/dto/request/DataSourceRequest.java @@ -84,6 +84,12 @@ public class DataSourceRequest { ) private String[] relCollectedFromDatasourceId; + @Parameter( + description = "Retrieve debug information for the search query", + schema = @Schema(type = "boolean", defaultValue = "true") + ) + private Boolean debugQuery; + @Min(value = 1) @Parameter( description = "Page number of the results", diff --git a/src/main/java/eu/openaire/api/dto/request/OrganizationRequest.java b/src/main/java/eu/openaire/api/dto/request/OrganizationRequest.java index 722e519..ce90bd9 100644 --- a/src/main/java/eu/openaire/api/dto/request/OrganizationRequest.java +++ b/src/main/java/eu/openaire/api/dto/request/OrganizationRequest.java @@ -63,6 +63,12 @@ public class OrganizationRequest { ) private String[] relCollectedFromDatasourceId; + @Parameter( + description = "Retrieve debug information for the search query", + schema = @Schema(type = "boolean", defaultValue = "true") + ) + private Boolean debugQuery; + @Min(value = 1) @Parameter( description = "Page number of the results", diff --git a/src/main/java/eu/openaire/api/dto/request/ProjectRequest.java b/src/main/java/eu/openaire/api/dto/request/ProjectRequest.java index 3f70700..90a95fb 100644 --- a/src/main/java/eu/openaire/api/dto/request/ProjectRequest.java +++ b/src/main/java/eu/openaire/api/dto/request/ProjectRequest.java @@ -130,6 +130,12 @@ public class ProjectRequest { ) private String[] relCollectedFromDatasourceId; + @Parameter( + description = "Retrieve debug information for the search query", + schema = @Schema(type = "boolean", defaultValue = "true") + ) + private Boolean debugQuery; + @Min(value = 1) @Parameter( description = "Page number of the results", diff --git a/src/main/java/eu/openaire/api/dto/request/ResearchProductsRequest.java b/src/main/java/eu/openaire/api/dto/request/ResearchProductsRequest.java index 32064bd..6b074a3 100644 --- a/src/main/java/eu/openaire/api/dto/request/ResearchProductsRequest.java +++ b/src/main/java/eu/openaire/api/dto/request/ResearchProductsRequest.java @@ -285,6 +285,12 @@ public class ResearchProductsRequest { ) private String[] relCollectedFromDatasourceId; + @Parameter( + description = "Retrieve debug information for the search query", + schema = @Schema(type = "boolean", defaultValue = "true") + ) + private Boolean debugQuery; + @Min(value = 1) @Parameter( description = "Page number of the results", diff --git a/src/main/java/eu/openaire/api/dto/request/validators/AllowableFieldsValidator.java b/src/main/java/eu/openaire/api/dto/request/validators/AllowableFieldsValidator.java index 47173c9..aa2f670 100644 --- a/src/main/java/eu/openaire/api/dto/request/validators/AllowableFieldsValidator.java +++ b/src/main/java/eu/openaire/api/dto/request/validators/AllowableFieldsValidator.java @@ -5,14 +5,11 @@ import eu.openaire.api.dto.request.OrganizationRequest; import eu.openaire.api.dto.request.ProjectRequest; import eu.openaire.api.dto.request.ResearchProductsRequest; import jakarta.servlet.http.HttpServletRequest; -import org.springframework.context.support.DefaultMessageSourceResolvable; import org.springframework.stereotype.Component; import org.springframework.validation.Errors; -import org.springframework.validation.ObjectError; import org.springframework.validation.Validator; import java.lang.reflect.Field; -import java.util.List; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -49,9 +46,4 @@ public class AllowableFieldsValidator implements Validator { }); } - public static String getErrorMessage(List allErrors) { - return allErrors.stream() - .map(DefaultMessageSourceResolvable::getDefaultMessage) - .collect(Collectors.joining("\n")); - } } diff --git a/src/main/java/eu/openaire/api/dto/request/validators/ResearchProductsRequestValidator.java b/src/main/java/eu/openaire/api/dto/request/validators/ResearchProductsRequestValidator.java index 00fb38b..5f59742 100644 --- a/src/main/java/eu/openaire/api/dto/request/validators/ResearchProductsRequestValidator.java +++ b/src/main/java/eu/openaire/api/dto/request/validators/ResearchProductsRequestValidator.java @@ -18,7 +18,6 @@ public class ResearchProductsRequestValidator implements Validator { allowableValues.put("bestOpenAccessRightLabel", Set.of("OPEN SOURCE", "OPEN", "EMBARGO", "RESTRICTED", "CLOSED", "UNKNOWN")); allowableValues.put("impactClasses", Set.of("C1", "C2", "C3", "C4", "C5")); allowableValues.put("openAccessColor", Set.of("bronze", "gold", "hybrid")); - } diff --git a/src/main/java/eu/openaire/api/dto/request/validators/Utils.java b/src/main/java/eu/openaire/api/dto/request/validators/Utils.java index 6f8025e..235b7f1 100644 --- a/src/main/java/eu/openaire/api/dto/request/validators/Utils.java +++ b/src/main/java/eu/openaire/api/dto/request/validators/Utils.java @@ -1,8 +1,12 @@ package eu.openaire.api.dto.request.validators; +import org.springframework.context.support.DefaultMessageSourceResolvable; import org.springframework.validation.Errors; +import org.springframework.validation.ObjectError; +import java.util.List; import java.util.Set; +import java.util.stream.Collectors; public class Utils { @@ -34,4 +38,11 @@ public class Utils { } } } + + public static String getErrorMessage(List allErrors) { + return allErrors.stream() + .map(DefaultMessageSourceResolvable::getDefaultMessage) + .collect(Collectors.joining("\n")); + } + } diff --git a/src/main/java/eu/openaire/api/dto/response/SearchHeader.java b/src/main/java/eu/openaire/api/dto/response/SearchHeader.java index fc48130..4d02eed 100644 --- a/src/main/java/eu/openaire/api/dto/response/SearchHeader.java +++ b/src/main/java/eu/openaire/api/dto/response/SearchHeader.java @@ -1,14 +1,14 @@ package eu.openaire.api.dto.response; +import com.fasterxml.jackson.annotation.JsonInclude; import eu.openaire.api.solr.SolrQueryParams; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data +@JsonInclude(JsonInclude.Include.NON_NULL) public class SearchHeader { - @Schema(hidden = true) - private SolrQueryParams queryParams; + private SolrQueryParams debugQuery; private long numFound; @@ -16,4 +16,8 @@ public class SearchHeader { private int queryTime; + private int page; + + private int pageSize; + } diff --git a/src/main/java/eu/openaire/api/mappers/query/DataSourceRequestMapper.java b/src/main/java/eu/openaire/api/mappers/query/DataSourceRequestMapper.java index b6b6f3f..625228d 100644 --- a/src/main/java/eu/openaire/api/mappers/query/DataSourceRequestMapper.java +++ b/src/main/java/eu/openaire/api/mappers/query/DataSourceRequestMapper.java @@ -64,7 +64,7 @@ public interface DataSourceRequestMapper { // form query string if (!qList.isEmpty()) { - solrQueryParams.setQ(String.join(" AND ", qList)); + solrQueryParams.setQueryString(String.join(" AND ", qList)); } // set FQ @@ -107,7 +107,7 @@ public interface DataSourceRequestMapper { fqList.add(String.format(solrFieldMapping.get("relCollectedFromDatasourceId"), Utils.escapeAndJoin(src.getRelCollectedFromDatasourceId(), "OR", false))); } - solrQueryParams.setFq(fqList); + solrQueryParams.setFilterQueries(fqList); } } diff --git a/src/main/java/eu/openaire/api/mappers/query/OrganizationRequestMapper.java b/src/main/java/eu/openaire/api/mappers/query/OrganizationRequestMapper.java index 709b9f3..cfee8e8 100644 --- a/src/main/java/eu/openaire/api/mappers/query/OrganizationRequestMapper.java +++ b/src/main/java/eu/openaire/api/mappers/query/OrganizationRequestMapper.java @@ -62,7 +62,7 @@ public interface OrganizationRequestMapper { // form query string if (!qList.isEmpty()) { - solrQueryParams.setQ(String.join(" AND ", qList)); + solrQueryParams.setQueryString(String.join(" AND ", qList)); } // set FQ @@ -94,7 +94,7 @@ public interface OrganizationRequestMapper { fqList.add(String.format(solrFieldMapping.get("relCollectedFromDatasourceId"), Utils.escapeAndJoin(src.getRelCollectedFromDatasourceId(), "OR", false))); } - solrQueryParams.setFq(fqList); + solrQueryParams.setFilterQueries(fqList); } } diff --git a/src/main/java/eu/openaire/api/mappers/query/ProjectRequestMapper.java b/src/main/java/eu/openaire/api/mappers/query/ProjectRequestMapper.java index beec2c0..fca4fbf 100644 --- a/src/main/java/eu/openaire/api/mappers/query/ProjectRequestMapper.java +++ b/src/main/java/eu/openaire/api/mappers/query/ProjectRequestMapper.java @@ -74,7 +74,7 @@ public interface ProjectRequestMapper { // form query string if (!qList.isEmpty()) { - solrQueryParams.setQ(String.join(" AND ", qList)); + solrQueryParams.setQueryString(String.join(" AND ", qList)); } // set FQ @@ -148,7 +148,7 @@ public interface ProjectRequestMapper { ) ).ifPresent(fqList::add); - solrQueryParams.setFq(fqList); + solrQueryParams.setFilterQueries(fqList); } diff --git a/src/main/java/eu/openaire/api/mappers/query/ResearchProductsRequestMapper.java b/src/main/java/eu/openaire/api/mappers/query/ResearchProductsRequestMapper.java index c513880..4af12cc 100644 --- a/src/main/java/eu/openaire/api/mappers/query/ResearchProductsRequestMapper.java +++ b/src/main/java/eu/openaire/api/mappers/query/ResearchProductsRequestMapper.java @@ -117,7 +117,7 @@ public interface ResearchProductsRequestMapper { // form query string if (!qList.isEmpty()) { - solrQueryParams.setQ(String.join(" AND ", qList)); + solrQueryParams.setQueryString(String.join(" AND ", qList)); } // set FQ @@ -281,7 +281,7 @@ public interface ResearchProductsRequestMapper { ) ).ifPresent(fqList::add); - solrQueryParams.setFq(fqList); + solrQueryParams.setFilterQueries(fqList); } } diff --git a/src/main/java/eu/openaire/api/mappers/response/ResponseHeaderMapper.java b/src/main/java/eu/openaire/api/mappers/response/ResponseHeaderMapper.java index 4388a98..4b42052 100644 --- a/src/main/java/eu/openaire/api/mappers/response/ResponseHeaderMapper.java +++ b/src/main/java/eu/openaire/api/mappers/response/ResponseHeaderMapper.java @@ -11,8 +11,11 @@ public interface ResponseHeaderMapper { @Mapping(target = "numFound", source = "queryResponse.results.numFound") @Mapping(target = "maxScore", source = "queryResponse.results.maxScore") + @Mapping(target = "page", source = "page") + @Mapping(target = "pageSize", source = "pageSize") @Mapping(target = "queryTime", expression = "java( (int) queryResponse.getHeader().get(\"QTime\") )") - @Mapping(target = "queryParams", source = "solrQueryParams") - SearchHeader toSearchHeader(QueryResponse queryResponse, SolrQueryParams solrQueryParams); + @Mapping(target = "debugQuery", expression = "java( (debugQuery) ? solrQueryParams : null )") + SearchHeader toSearchHeader(QueryResponse queryResponse, SolrQueryParams solrQueryParams, + boolean debugQuery, int page, int pageSize); } \ No newline at end of file diff --git a/src/main/java/eu/openaire/api/repositories/SolrRepository.java b/src/main/java/eu/openaire/api/repositories/SolrRepository.java index 7f9389f..fbef45b 100644 --- a/src/main/java/eu/openaire/api/repositories/SolrRepository.java +++ b/src/main/java/eu/openaire/api/repositories/SolrRepository.java @@ -31,15 +31,15 @@ public class SolrRepository { SolrQuery query = new SolrQuery(); // add Q - query.setQuery(queryParams.getQ()); + query.setQuery(queryParams.getQueryString()); // add FQ - for (String fq : queryParams.getFq()) { + for (String fq : queryParams.getFilterQueries()) { query.addFilterQuery(fq); } // add FL - query.addField(queryParams.getFl()); + query.addField(queryParams.getFieldList()); // set pagination parameters query.setStart(queryParams.getStart()); diff --git a/src/main/java/eu/openaire/api/services/DataSourceService.java b/src/main/java/eu/openaire/api/services/DataSourceService.java index 2971c35..9c075bf 100644 --- a/src/main/java/eu/openaire/api/services/DataSourceService.java +++ b/src/main/java/eu/openaire/api/services/DataSourceService.java @@ -52,14 +52,14 @@ public class DataSourceService { SolrQueryParams solrQueryParams = dataSourceRequestMapper.toSolrQuery(request); - // TODO: debug log here - log.info(solrQueryParams); + log.debug(solrQueryParams); // format the header response QueryResponse queryResponse = solrRepository.query(solrQueryParams); // format the result documents - SearchHeader searchHeader = responseHeaderMapper.toSearchHeader(queryResponse, solrQueryParams); + SearchHeader searchHeader = responseHeaderMapper.toSearchHeader(queryResponse, solrQueryParams, + request.getDebugQuery(), request.getPage(), request.getPageSize()); // format the result documents List results = responseResultsMapper.toSearchResults(queryResponse, datasourceMapper::toGraphDatasource); diff --git a/src/main/java/eu/openaire/api/services/OrganizationService.java b/src/main/java/eu/openaire/api/services/OrganizationService.java index 7980284..602e431 100644 --- a/src/main/java/eu/openaire/api/services/OrganizationService.java +++ b/src/main/java/eu/openaire/api/services/OrganizationService.java @@ -52,14 +52,14 @@ public class OrganizationService { SolrQueryParams solrQueryParams = organizationRequestMapper.toSolrQuery(request); - // TODO: debug log here - log.info(solrQueryParams); + log.debug(solrQueryParams); // format the header response QueryResponse queryResponse = solrRepository.query(solrQueryParams); // format the result documents - SearchHeader searchHeader = responseHeaderMapper.toSearchHeader(queryResponse, solrQueryParams); + SearchHeader searchHeader = responseHeaderMapper.toSearchHeader(queryResponse, solrQueryParams, + request.getDebugQuery(), request.getPage(), request.getPageSize()); // format the result documents List results = responseResultsMapper.toSearchResults(queryResponse, organizationMapper::toGraphOrganization); diff --git a/src/main/java/eu/openaire/api/services/ProjectService.java b/src/main/java/eu/openaire/api/services/ProjectService.java index cfd8211..191554e 100644 --- a/src/main/java/eu/openaire/api/services/ProjectService.java +++ b/src/main/java/eu/openaire/api/services/ProjectService.java @@ -52,14 +52,14 @@ public class ProjectService { SolrQueryParams solrQueryParams = projectRequestMapper.toSolrQuery(request); - // TODO: debug log here - log.info(solrQueryParams); + log.debug(solrQueryParams); // perform the query QueryResponse queryResponse = solrRepository.query(solrQueryParams); // format the header response - SearchHeader searchHeader = responseHeaderMapper.toSearchHeader(queryResponse, solrQueryParams); + SearchHeader searchHeader = responseHeaderMapper.toSearchHeader(queryResponse, solrQueryParams, + request.getDebugQuery(), request.getPage(), request.getPageSize()); // format the result documents List results = responseResultsMapper.toSearchResults(queryResponse, projectMapper::toGraphProject); diff --git a/src/main/java/eu/openaire/api/services/ResearchProductService.java b/src/main/java/eu/openaire/api/services/ResearchProductService.java index b2bb7b3..84a9d09 100644 --- a/src/main/java/eu/openaire/api/services/ResearchProductService.java +++ b/src/main/java/eu/openaire/api/services/ResearchProductService.java @@ -53,14 +53,14 @@ public class ResearchProductService { SolrQueryParams solrQueryParams = researchProductsRequestMapper.toSolrQuery(request); - // TODO: debug log here - log.info(solrQueryParams); + log.debug(solrQueryParams); // perform the query QueryResponse queryResponse = solrRepository.query(solrQueryParams); // format the header response - SearchHeader searchHeader = responseHeaderMapper.toSearchHeader(queryResponse, solrQueryParams); + SearchHeader searchHeader = responseHeaderMapper.toSearchHeader(queryResponse, solrQueryParams, + request.getDebugQuery(), request.getPage(), request.getPageSize()); // format the result documents List results = responseResultsMapper.toSearchResults(queryResponse, researchProductMapper::toGraphResult); diff --git a/src/main/java/eu/openaire/api/solr/SolrQueryParams.java b/src/main/java/eu/openaire/api/solr/SolrQueryParams.java index c5ad118..39469e7 100644 --- a/src/main/java/eu/openaire/api/solr/SolrQueryParams.java +++ b/src/main/java/eu/openaire/api/solr/SolrQueryParams.java @@ -8,11 +8,11 @@ import java.util.List; @Data public class SolrQueryParams { - String q = "*:*"; + String queryString = "*:*"; - List fq; + List filterQueries; - String fl = "__json"; + String fieldList = "__json"; int start;