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


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)


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


upload

boolean upload(SolrInputDocument doc)

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

Returns:
true on success, false on failure

init

void init(Context context)

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


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)



Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.