Interface IndexerService

  • All Known Implementing Classes:
    DefaultIndexerService

    public interface IndexerService
    Implementations of this interface should be responsible for indexing operations.
    • Method Detail

      • performFullIndex

        void performFullIndex​(FacetSearchConfig facetSearchConfig)
                       throws IndexerException
        Performs a full index operation which recreates the index. All the types associated with the facet search configuration are considered. Items to be indexed are selected based on the full index query.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        Throws:
        IndexerException - exception is thrown when full index query is missing in configuration or an unexpected error occurs during indexing.
      • performFullIndex

        void performFullIndex​(FacetSearchConfig facetSearchConfig,
                              java.util.Map<java.lang.String,​java.lang.String> indexerHints)
                       throws IndexerException
        Same as performFullIndex(FacetSearchConfig) but allows to pass the indexer hints as parameter.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexerHints - - the indexer hints
        Throws:
        IndexerException - exception is thrown when full index query is missing in configuration or an unexpected error occurs during indexing.
      • updateIndex

        void updateIndex​(FacetSearchConfig facetSearchConfig)
                  throws IndexerException
        Updates some items on the index. All the types associated with the facet search configuration are considered. Items to be updated are selected based on the update index query.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        Throws:
        IndexerException - exception is thrown when update index query is missing in configuration or an unexpected error occurs during indexing.
      • updateIndex

        void updateIndex​(FacetSearchConfig facetSearchConfig,
                         java.util.Map<java.lang.String,​java.lang.String> indexerHints)
                  throws IndexerException
        Same as updateIndex(FacetSearchConfig) but allows to pass the indexer hints as parameter.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexerHints - - the indexer hints
        Throws:
        IndexerException - exception is thrown when update index query is missing in configuration or an unexpected error occurs during indexing.
      • updateTypeIndex

        void updateTypeIndex​(FacetSearchConfig facetSearchConfig,
                             IndexedType indexedType)
                      throws IndexerException
        Updates some items on the index for a specific type. Items to be updated are selected based on the update index query.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        Throws:
        IndexerException - exception is thrown when update index query is missing in configuration or an unexpected error occurs during indexing.
      • updateTypeIndex

        void updateTypeIndex​(FacetSearchConfig facetSearchConfig,
                             IndexedType indexedType,
                             java.util.Map<java.lang.String,​java.lang.String> indexerHints)
                      throws IndexerException
        Same as updateTypeIndex(FacetSearchConfig, IndexedType) but allows to pass the indexer hints as parameter.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        indexerHints - - the indexer hints
        Throws:
        IndexerException - exception is thrown when update index query is missing in configuration or an unexpected error occurs during indexing.
      • updateTypeIndex

        void updateTypeIndex​(FacetSearchConfig facetSearchConfig,
                             IndexedType indexedType,
                             java.util.List<PK> pks)
                      throws IndexerException
        Updates some items on the index for a specific type.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        pks - - pks of items to be updated
        Throws:
        IndexerException - exception is thrown when an unexpected error occurs during indexing.
      • updateTypeIndex

        void updateTypeIndex​(FacetSearchConfig facetSearchConfig,
                             IndexedType indexedType,
                             java.util.List<PK> pks,
                             java.util.Map<java.lang.String,​java.lang.String> indexerHints)
                      throws IndexerException
        Same as updateTypeIndex(FacetSearchConfig, IndexedType, List) but allows to pass the indexer hints as parameter.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        pks - - pks of items to be updated
        indexerHints - - the indexer hints
        Throws:
        IndexerException - exception is thrown when an unexpected error occurs during indexing.
      • updatePartialTypeIndex

        void updatePartialTypeIndex​(FacetSearchConfig facetSearchConfig,
                                    IndexedType indexedType,
                                    java.util.Collection<IndexedProperty> indexedProperties,
                                    java.util.List<PK> pks)
                             throws IndexerException
        Updates some properties of some items on the index for a specific type.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        indexedProperties - - properties to update
        pks - - pks of items to be updated
        Throws:
        IndexerException - exception is thrown when an unexpected error occurs during indexing.
      • deleteFromIndex

        void deleteFromIndex​(FacetSearchConfig facetSearchConfig)
                      throws IndexerException
        Removes some items from the index. All the types associated with the facet search configuration are considered. Items to be removed are selected based on the delete index query.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        Throws:
        IndexerException - exception is thrown when delete index query is missing in configuration or an unexpected error occurs during indexing.
      • deleteFromIndex

        void deleteFromIndex​(FacetSearchConfig facetSearchConfig,
                             java.util.Map<java.lang.String,​java.lang.String> indexerHints)
                      throws IndexerException
        Same as deleteFromIndex(FacetSearchConfig) but allows to pass the indexer hints as parameter.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexerHints - - the indexer hints
        Throws:
        IndexerException - exception is thrown when delete index query is missing in configuration or an unexpected error occurs during indexing.
      • deleteTypeIndex

        void deleteTypeIndex​(FacetSearchConfig facetSearchConfig,
                             IndexedType indexedType)
                      throws IndexerException
        Removes some items from the index for a specific type. Items to be removed are selected based on the delete index query.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        Throws:
        IndexerException - exception is thrown when delete index query is missing in configuration or an unexpected error occurs during indexing.
      • deleteTypeIndex

        void deleteTypeIndex​(FacetSearchConfig facetSearchConfig,
                             IndexedType indexedType,
                             java.util.Map<java.lang.String,​java.lang.String> indexerHints)
                      throws IndexerException
        Same as deleteTypeIndex(FacetSearchConfig, IndexedType) but allows to pass the indexer hints as parameter.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        indexerHints - - the indexer hints
        Throws:
        IndexerException - exception is thrown when delete index query is missing in configuration or an unexpected error occurs during indexing.
      • deleteTypeIndex

        void deleteTypeIndex​(FacetSearchConfig facetSearchConfig,
                             IndexedType indexedType,
                             java.util.List<PK> pks)
                      throws IndexerException
        Removes some items from the index for a specific type.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        pks - - pks of items to be removed
        Throws:
        IndexerException - exception is thrown when an unexpected error occurs during indexing.
      • deleteTypeIndex

        void deleteTypeIndex​(FacetSearchConfig facetSearchConfig,
                             IndexedType indexedType,
                             java.util.List<PK> pks,
                             java.util.Map<java.lang.String,​java.lang.String> indexerHints)
                      throws IndexerException
        Same as deleteTypeIndex(FacetSearchConfig, IndexedType, List) but allows to pass the indexer hints as parameter.
        Parameters:
        facetSearchConfig - - configuration for indexer instance
        indexedType - - selected type
        pks - - pks of items to be removed
        indexerHints - - the indexer hints
        Throws:
        IndexerException - exception is thrown when an unexpected error occurs during indexing.