public class SolrWriter extends DIHWriterBase implements DIHWriter
Writes documents to SOLR.
This API is experimental and may change in the future.| Modifier and Type | Field and Description |
|---|---|
static String |
LAST_INDEX_KEY |
deltaKeys, keyFieldName| Constructor and Description |
|---|
SolrWriter(UpdateRequestProcessor processor,
SolrQueryRequest req) |
| Modifier and Type | Method and Description |
|---|---|
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 query)
Delete from the writer's underlying data store based the passed-in writer-specific query.
|
void |
deleteDoc(Object id)
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.
|
boolean |
upload(SolrInputDocument d)
Add a document to this writer's underlying data store.
|
setDeltaKeysclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetDeltaKeyspublic static final String LAST_INDEX_KEY
public SolrWriter(UpdateRequestProcessor processor, SolrQueryRequest req)
public void close()
DIHWriterRelease resources used by this writer. After calling close, reads & updates will throw exceptions.
public boolean upload(SolrInputDocument d)
DIHWriterAdd a document to this writer's underlying data store.
public void deleteDoc(Object id)
DIHWriterDelete from the writer's underlying data store based on the passed-in Primary Key
public void deleteByQuery(String query)
DIHWriterDelete from the writer's underlying data store based the passed-in writer-specific query. (Optional Operation)
deleteByQuery in interface DIHWriterpublic void commit(boolean optimize)
DIHWriterIf this writer supports transactions or commit points, then commit any changes, optionally optimizing the data for read/write performance
public void rollback()
DIHWriterIf this writer supports transactions or commit points, then roll back any uncommitted changes.
public void doDeleteAll()
DIHWriterDelete everything from the writer's underlying data store
doDeleteAll in interface DIHWriterCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.