Class DiscoverQueryBuilder

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    public class DiscoverQueryBuilder
    extends Object
    implements org.springframework.beans.factory.InitializingBean
    • Constructor Detail

      • DiscoverQueryBuilder

        public DiscoverQueryBuilder()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        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 context
        scope - the scope for this discovery query
        discoveryConfiguration - the discovery configuration for this discovery query
        query - the query string for this discovery query
        searchFilters - the search filters for this discovery query
        dsoType - only include search results with this type
        pageSize - the page size for this discovery query
        offset - the offset for this discovery query
        sortProperty - the sort property for this discovery query
        sortDirection - the sort direction for this discovery query
        Throws:
        SearchServiceException
      • 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 context
        scope - the scope for this discovery query
        discoveryConfiguration - the discovery configuration for this discovery query
        prefix - limit the facets results to those starting with the given prefix.
        query - the query string for this discovery query
        searchFilters - the search filters for this discovery query
        dsoType - only include search results with this type
        pageSize - the page size for this discovery query
        offset - the offset for this discovery query
        facetName - 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 context
        scope - the scope for this discovery query
        discoveryConfiguration - the discovery configuration for this discovery query
        prefix - limit the facets results to those starting with the given prefix.
        query - the query string for this discovery query
        searchFilters - the search filters for this discovery query
        dsoTypes - only include search results with one of these types
        pageSize - the page size for this discovery query
        offset - the offset for this discovery query
        facetName - the facet field
        Throws:
        IllegalArgumentException
      • setIndexableFactories

        public void setIndexableFactories​(List<IndexFactory> indexableFactories)