Interface SearchIndexBuilder

  • All Known Subinterfaces:
    SiteSearchIndexBuilder

    public interface SearchIndexBuilder
    A SearchIndexBuilder builds a search index, it must manage its own list of pending documents and should probably do this in a separate thread
    Author:
    ieb
    • Method Detail

      • getName

        String getName()
        Access the logical, well-known name of this index builder. This name may be distinct from the phyisical name of the index this builder manages, and may be cached by SearchService as a key for index-specific search queries.
        Returns:
      • addResource

        void addResource​(Notification notification,
                         Event event)
        Adds a resource to the index builder
        Parameters:
        notification -
        event -
      • registerEntityContentProducer

        void registerEntityContentProducer​(EntityContentProducer ecp)
        Register an implementation-specific indexable content producer instance with this SearchIndexBuilder.
        Parameters:
        ecp -
      • refreshIndex

        void refreshIndex()
        Refresh the index based on the registered entities
      • rebuildIndex

        void rebuildIndex()
        rebuild the index completely from scratch
      • isBuildQueueEmpty

        boolean isBuildQueueEmpty()
        Does the Queue contain work to do.
        Returns:
      • getContentProducers

        List<EntityContentProducer> getContentProducers()
        Get all the producers registered, as a clone to avoid concurrent modification exceptions
        Returns:
      • destroy

        void destroy()
        Close down the entire search infrastructure
      • getPendingDocuments

        int getPendingDocuments()
        get the number of pending documents
        Returns:
      • getAllSearchItems

        List<SearchBuilderItem> getAllSearchItems()
        get a list of all entitied in the search index
        Returns:
      • newEntityContentProducer

        EntityContentProducer newEntityContentProducer​(Event event)
        get an entity content producer that can handle the event
        Parameters:
        event -
        Returns:
      • newEntityContentProducer

        EntityContentProducer newEntityContentProducer​(String ref)
        get an entity content producer that can handle the reference
        Parameters:
        ref -
        Returns:
      • getGlobalMasterSearchItems

        List<SearchBuilderItem> getGlobalMasterSearchItems()
        get a list of global search items
        Returns: