Class ClusterSearchEngine

  • All Implemented Interfaces:
    com.logicaldoc.core.searchengine.SearchEngine, PayloadHandler, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class ClusterSearchEngine
    extends com.logicaldoc.core.searchengine.StandardSearchEngine
    implements PayloadHandler, org.springframework.context.ApplicationContextAware
    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
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext context)
                                   throws org.springframework.beans.BeansException
        Registers this engine as handler for 'index' messages
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException