Interface IndexingFilter

  • All Implemented Interfaces:
    ai.platon.pulsar.common.config.Configurable , ai.platon.pulsar.common.config.Parameterized , ai.platon.pulsar.skeleton.crawl.common.LazyConfigurable

    
    public interface IndexingFilter
     implements Parameterized, LazyConfigurable
                        

    Extension point for indexing. Permits one to add metadata to the indexed fields. All plugins found which implement this extension point are run sequentially on the parse.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract IndexDocument filter(IndexDocument doc, String url, WebPage page) Adds fields or otherwise modifies the document that will be indexed for a parse.
      • Methods inherited from class ai.platon.pulsar.common.config.Parameterized

        getParams
      • Methods inherited from class ai.platon.pulsar.skeleton.crawl.common.LazyConfigurable

        configure
      • Methods inherited from class ai.platon.pulsar.common.config.Configurable

        getConf, setConf
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • filter

         abstract IndexDocument filter(IndexDocument doc, String url, WebPage page)

        Adds fields or otherwise modifies the document that will be indexed for a parse. Unwanted documents can be removed from indexing by returning a null value.

        Parameters:
        doc - document instance for collecting fields
        url - page url
        Returns:

        modified (or a new) document instance, or null (meaning the document should be discarded)