Package org.apache.nutch.indexwriter.dummy

## Class DummyIndexWriter

- java.lang.Object
- - org.apache.nutch.indexwriter.dummy.DummyIndexWriter

- All Implemented Interfaces:
    `Configurable`, `IndexWriter`, `Pluggable`

      public class DummyIndexWriter
      extends Object
      implements IndexWriter

  DummyIndexWriter. This pluggable indexer writes <action>\t<url>\n lines to a plain text file for debugging purposes. Possible actions are delete, update and add.

- - ### Field Summary

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

      `X_POINT_ID`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DummyIndexWriter()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` |
    `void` | `commit()` |
    `void` | `delete​(String key)` |
    `Map<String,​Map.Entry<String,​Object>>` | `describe()` | Returns `Map` with the specific parameters the IndexWriter instance can take.
    `Configuration` | `getConf()` |
    `void` | `open​(Configuration conf, String name)` |
    `void` | `open​(IndexWriterParams parameters)` | Initializes the internal variables from a given index writer configuration.
    `void` | `setConf​(Configuration conf)` |
    `void` | `update​(NutchDocument doc)` |
    `void` | `write​(NutchDocument doc)` |

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

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

- - ### Constructor Detail

    - #### DummyIndexWriter

          public DummyIndexWriter()

  - ### Method Detail

    - #### open

          public void open​(Configuration conf,
                           String name)
                    throws IOException

      Specified by:
        `open` in interface `IndexWriter`
      Parameters:
        `conf` - Nutch configuration
        `name` - target name of the `IndexWriter` to be opened
      Throws:
        `IOException` - Some exception thrown by some writer.

    - #### open

          public void open​(IndexWriterParams parameters)
                    throws IOException

      Initializes the internal variables from a given index writer configuration.
      Specified by:
        `open` in interface `IndexWriter`
      Parameters:
        `parameters` - Params from the index writer configuration.
      Throws:
        `IOException` - Some exception thrown by writer.

    - #### delete

          public void delete​(String key)
                      throws IOException

      Specified by:
        `delete` in interface `IndexWriter`
      Throws:
        `IOException`

    - #### update

          public void update​(NutchDocument doc)
                      throws IOException

      Specified by:
        `update` in interface `IndexWriter`
      Throws:
        `IOException`

    - #### write

          public void write​(NutchDocument doc)
                     throws IOException

      Specified by:
        `write` in interface `IndexWriter`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `IndexWriter`
      Throws:
        `IOException`

    - #### commit

          public void commit()
                      throws IOException

      Specified by:
        `commit` in interface `IndexWriter`
      Throws:
        `IOException`

    - #### getConf

          public Configuration getConf()

      Specified by:
        `getConf` in interface `Configurable`

    - #### setConf

          public void setConf​(Configuration conf)

      Specified by:
        `setConf` in interface `Configurable`

    - #### describe

          public Map<String,​Map.Entry<String,​Object>> describe()

      Returns `Map` with the specific parameters the IndexWriter instance can take.
      Specified by:
        `describe` in interface `IndexWriter`
      Returns:
        The values of each row. It must have the form <KEY,<DESCRIPTION,VALUE>>.