Package org.dspace.discovery.utils
Class DiscoverQueryBuilder
java.lang.Object
org.dspace.discovery.utils.DiscoverQueryBuilder
- All Implemented Interfaces:
InitializingBean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildFacetQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String prefix, String query, List<QueryBuilderSearchFilter> searchFilters, String dsoType, Integer pageSize, Long offset, String facetName) Create a discovery facet query.buildFacetQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String prefix, String query, List<QueryBuilderSearchFilter> searchFilters, List<String> dsoTypes, Integer pageSize, Long offset, String facetName) Create a discovery facet query.buildQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String query, List<QueryBuilderSearchFilter> searchFilters, String dsoType, Integer pageSize, Long offset, String sortProperty, String sortDirection) Build a discovery querybuildQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String query, List<QueryBuilderSearchFilter> searchFilters, List<String> dsoTypes, Integer pageSize, Long offset, String sortProperty, String sortDirection) Build a discovery queryvoidsetIndexableFactories(List<IndexFactory> indexableFactories)
-
Constructor Details
-
DiscoverQueryBuilder
public DiscoverQueryBuilder()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Throws:
Exception
-
buildQuery
public DiscoverQuery buildQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String query, List<QueryBuilderSearchFilter> searchFilters, String dsoType, Integer pageSize, Long offset, String sortProperty, String sortDirection) throws SearchServiceException 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 typepageSize- the page size for this discovery queryoffset- the offset for this discovery querysortProperty- the sort property for this discovery querysortDirection- the sort direction for this discovery query- Throws:
SearchServiceException
-
buildQuery
public DiscoverQuery buildQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String query, List<QueryBuilderSearchFilter> searchFilters, List<String> dsoTypes, Integer pageSize, Long offset, String sortProperty, String sortDirection) throws IllegalArgumentException, SearchServiceException 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 typespageSize- the page size for this discovery queryoffset- the offset for this discovery querysortProperty- the sort property for this discovery querysortDirection- the sort direction for this discovery query- Throws:
IllegalArgumentExceptionSearchServiceException
-
buildFacetQuery
public DiscoverQuery buildFacetQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String prefix, String query, List<QueryBuilderSearchFilter> searchFilters, String dsoType, Integer pageSize, Long offset, String facetName) throws IllegalArgumentException 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 typepageSize- the page size for this discovery queryoffset- the offset for this discovery queryfacetName- the facet field- Throws:
IllegalArgumentException
-
buildFacetQuery
public DiscoverQuery buildFacetQuery(Context context, IndexableObject scope, DiscoveryConfiguration discoveryConfiguration, String prefix, String query, List<QueryBuilderSearchFilter> searchFilters, List<String> dsoTypes, Integer pageSize, Long offset, String facetName) throws IllegalArgumentException 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 typespageSize- the page size for this discovery queryoffset- the offset for this discovery queryfacetName- the facet field- Throws:
IllegalArgumentException
-
setIndexableFactories
-