org.apache.nutch.indexer.basic

## Class BasicIndexingFilter

- java.lang.Object
- - org.apache.nutch.indexer.basic.BasicIndexingFilter

- All Implemented Interfaces:
    Configurable, IndexingFilter, FieldPluggable, Pluggable

      public class BasicIndexingFilter
      extends java.lang.Object
      implements IndexingFilter

  Adds basic searchable fields to a document. The fields are: host - add host as un-stored, indexed and tokenized url - url is both stored and indexed, so it's both searchable and returned. This is also a required field. content - content is indexed, so that it's searchable, but not stored in index title - title is stored and indexed cache - add cached content/summary display policy, if available tstamp - add timestamp when fetched, for deduplication

- - ### Field Summary

    - ### Fields inherited from interface org.apache.nutch.indexer.IndexingFilter

      `X_POINT_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicIndexingFilter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addIndexBackendOptions(Configuration conf)`
    `NutchDocument` | `filter(NutchDocument doc, java.lang.String url, WebPage page)` The `BasicIndexingFilter` filter object which supports boolean configurable value for length of characters permitted within the title @see `indexer.max.title.length` in nutch-default.xml
    `Configuration` | `getConf()` Get the `Configuration` object
    `java.util.Collection<WebPage.Field>` | `getFields()` Gets all the fields for a given `WebPage` Many datastores need to setup the mapreduce job by specifying the fields needed.
    `void` | `setConf(Configuration conf)` Set the `Configuration` object

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BasicIndexingFilter

          public BasicIndexingFilter()

  - ### Method Detail

    - #### filter

          public NutchDocument filter(NutchDocument doc,
                                      java.lang.String url,
                                      WebPage page)
                               throws IndexingException

      The `BasicIndexingFilter` filter object which supports boolean configurable value for length of characters permitted within the title @see `indexer.max.title.length` in nutch-default.xml
      Specified by:
        `filter` in interface `IndexingFilter`
      Parameters:
        `doc` - The `NutchDocument` object
        `url` - URL to be filtered for anchor text
        `page` - `WebPage` object relative to the URL
      Returns:
        filtered NutchDocument
      Throws:
        `IndexingException`

    - #### addIndexBackendOptions

          public void addIndexBackendOptions(Configuration conf)

    - #### setConf

          public void setConf(Configuration conf)

      Set the `Configuration` object
      Specified by:
        `setConf` in interface `Configurable`

    - #### getConf

          public Configuration getConf()

      Get the `Configuration` object
      Specified by:
        `getConf` in interface `Configurable`

    - #### getFields

          public java.util.Collection<WebPage.Field> getFields()

      Gets all the fields for a given `WebPage` Many datastores need to setup the mapreduce job by specifying the fields needed. All extensions that work on WebPage are able to specify what fields they need.
      Specified by:
        `getFields` in interface `FieldPluggable`

Copyright © 2019 The Apache Software Foundation