Class ClusterSearchEngine

  • All Implemented Interfaces:
    com.logicaldoc.core.searchengine.SearchEngine, PayloadHandler, EventListener, org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>

    public class ClusterSearchEngine
    extends com.logicaldoc.core.searchengine.StandardSearchEngine
    implements PayloadHandler, org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
    A cluster-aware search engine.
    Since:
    6.5
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • ClusterSearchEngine

        public ClusterSearchEngine()
    • Method Detail

      • deleteHit

        public void deleteHit​(long id)
        Specified by:
        deleteHit in interface com.logicaldoc.core.searchengine.SearchEngine
        Overrides:
        deleteHit in class com.logicaldoc.core.searchengine.StandardSearchEngine
      • deleteHits

        public void deleteHits​(Collection<Long> ids)
        Specified by:
        deleteHits in interface com.logicaldoc.core.searchengine.SearchEngine
        Overrides:
        deleteHits in class com.logicaldoc.core.searchengine.StandardSearchEngine
      • getHit

        public com.logicaldoc.core.searchengine.Hit getHit​(long id)
        Specified by:
        getHit in interface com.logicaldoc.core.searchengine.SearchEngine
        Overrides:
        getHit in class com.logicaldoc.core.searchengine.StandardSearchEngine
      • search

        public com.logicaldoc.core.searchengine.Hits search​(String expression,
                                                            String[] filters,
                                                            String expressionLanguage,
                                                            Integer rows)
        Specified by:
        search in interface com.logicaldoc.core.searchengine.SearchEngine
        Overrides:
        search in class com.logicaldoc.core.searchengine.StandardSearchEngine
      • handle

        public Object handle​(Payload payload)
                      throws Exception
        Description copied from interface: PayloadHandler
        Invoked when a new message arrives from the cluster.
        Specified by:
        handle in interface PayloadHandler
        Parameters:
        payload - Payload to be processed
        Returns:
        The response to the received message
        Throws:
        Exception - a generic error
      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.context.event.ApplicationContextEvent event)
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>