DIHWriter (Solr 3.6.2 API)
Keywords: org.apache.solr.handler.dataimport.DIHWriter interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.handler.dataimport
Interface DIHWriter

All Known Implementing Classes:
  DIHWriterBase, SolrWriter

    public interface DIHWriter

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
`void` | `close()` Release resources used by this writer.
`void` | `commit(boolean optimize)` If this writer supports transactions or commit points, then commit any changes, optionally optimizing the data for read/write performance
`void` | `deleteByQuery(String q)` Delete from the writer's underlying data store based the passed-in writer-specific query.
`void` | `deleteDoc(Object key)` Delete from the writer's underlying data store based on the passed-in Primary Key
`void` | `doDeleteAll()` Delete everything from the writer's underlying data store
`void` | `init(Context context)` Provide context information for this writer.
`void` | `rollback()` If this writer supports transactions or commit points, then roll back any uncommitted changes.
`void` | `setDeltaKeys(Set<Map<String,Object>> deltaKeys)` Specify the keys to be modified by a delta update (required by writers that can store duplicate keys)
`boolean` | `upload(SolrInputDocument doc)` Add a document to this writer's underlying data store.

Method Detail

### commit

    void commit(boolean optimize)

  If this writer supports transactions or commit points, then commit any changes, optionally optimizing the data for read/write performance

  Parameters:
    `optimize` -

### close

    void close()

  Release resources used by this writer. After calling close, reads & updates will throw exceptions.

### rollback

    void rollback()

  If this writer supports transactions or commit points, then roll back any uncommitted changes.

### deleteByQuery

    void deleteByQuery(String q)

  Delete from the writer's underlying data store based the passed-in writer-specific query. (Optional Operation)

  Parameters:
    `q` -

### doDeleteAll

    void doDeleteAll()

  Delete everything from the writer's underlying data store

### deleteDoc

    void deleteDoc(Object key)

  Delete from the writer's underlying data store based on the passed-in Primary Key

  Parameters:
    `key` -

### upload

    boolean upload(SolrInputDocument doc)

  Add a document to this writer's underlying data store.

  Parameters:
    `doc` -
  Returns:
    true if success

### init

    void init(Context context)

  Provide context information for this writer. init() should be called before using the writer.

  Parameters:
    `context` -

### setDeltaKeys

    void setDeltaKeys(Set<Map<String,Object>> deltaKeys)

  Specify the keys to be modified by a delta update (required by writers that can store duplicate keys)

  Parameters:
    `deltaKeys` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD