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.
-
-
Method Summary
Modifier and Type Method Description abstract IndexDocumentfilter(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
-
-
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 fieldsurl- page url- Returns:
modified (or a new) document instance, or null (meaning the document should be discarded)
-
-
-
-