Package org.dspace.app.rest.utils
Class RestDiscoverQueryBuilder
- java.lang.Object
-
- org.dspace.app.rest.utils.RestDiscoverQueryBuilder
-
@Component public class RestDiscoverQueryBuilder extends Object
This class builds the queries for the /search and /facet endpoints.
-
-
Constructor Summary
Constructors Constructor Description RestDiscoverQueryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiscoverQuerybuildFacetQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String prefix, String query, List<SearchFilter> searchFilters, String dsoType, org.springframework.data.domain.Pageable page, String facetName)Create a discovery facet query.DiscoverQuerybuildFacetQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String prefix, String query, List<SearchFilter> searchFilters, List<String> dsoTypes, org.springframework.data.domain.Pageable page, String facetName)Create a discovery facet query.DiscoverQuerybuildQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String query, List<SearchFilter> searchFilters, String dsoType, org.springframework.data.domain.Pageable page)Build a discovery queryDiscoverQuerybuildQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String query, List<SearchFilter> searchFilters, List<String> dsoTypes, org.springframework.data.domain.Pageable page)Build a discovery query
-
-
-
Method Detail
-
buildQuery
public DiscoverQuery buildQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String query, List<SearchFilter> searchFilters, String dsoType, org.springframework.data.domain.Pageable page) throws DSpaceBadRequestException
Build a discovery query- Parameters:
context- the DSpace contextscope- the scope for this discovery querydiscoveryConfiguration- the discovery configuration for this discovery queryquery- the query string for this discovery querysearchFilters- the search filters for this discovery querydsoType- only include search results with this typepage- the pageable for this discovery query- Throws:
DSpaceBadRequestException
-
buildQuery
public DiscoverQuery buildQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String query, List<SearchFilter> searchFilters, List<String> dsoTypes, org.springframework.data.domain.Pageable page) throws DSpaceBadRequestException
Build a discovery query- Parameters:
context- the DSpace contextscope- the scope for this discovery querydiscoveryConfiguration- the discovery configuration for this discovery queryquery- the query string for this discovery querysearchFilters- the search filters for this discovery querydsoTypes- only include search results with one of these typespage- the pageable for this discovery query- Throws:
DSpaceBadRequestException
-
buildFacetQuery
public DiscoverQuery buildFacetQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String prefix, String query, List<SearchFilter> searchFilters, String dsoType, org.springframework.data.domain.Pageable page, String facetName) throws DSpaceBadRequestException
Create a discovery facet query.- Parameters:
context- the DSpace contextscope- the scope for this discovery querydiscoveryConfiguration- the discovery configuration for this discovery queryprefix- limit the facets results to those starting with the given prefix.query- the query string for this discovery querysearchFilters- the search filters for this discovery querydsoType- only include search results with this typepage- the pageable for this discovery queryfacetName- the facet field- Throws:
DSpaceBadRequestException
-
buildFacetQuery
public DiscoverQuery buildFacetQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String prefix, String query, List<SearchFilter> searchFilters, List<String> dsoTypes, org.springframework.data.domain.Pageable page, String facetName) throws DSpaceBadRequestException
Create a discovery facet query.- Parameters:
context- the DSpace contextscope- the scope for this discovery querydiscoveryConfiguration- the discovery configuration for this discovery queryprefix- limit the facets results to those starting with the given prefix.query- the query string for this discovery querysearchFilters- the search filters for this discovery querydsoTypes- only include search results with one of these typespage- the pageable for this discovery queryfacetName- the facet field- Throws:
DSpaceBadRequestException
-
-