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.
|
setDeltaKeys
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setDeltaKeys
public static final String LAST_INDEX_KEY
public SolrWriter(UpdateRequestProcessor processor, SolrQueryRequest req)
public void close()
DIHWriter
Release resources used by this writer. After calling close, reads & updates will throw exceptions.
public boolean upload(SolrInputDocument d)
DIHWriter
Add a document to this writer's underlying data store.
public void deleteDoc(Object id)
DIHWriter
Delete from the writer's underlying data store based on the passed-in Primary Key
public void deleteByQuery(String query)
DIHWriter
Delete from the writer's underlying data store based the passed-in writer-specific query. (Optional Operation)
deleteByQuery
in interface DIHWriter
public void commit(boolean optimize)
DIHWriter
If this writer supports transactions or commit points, then commit any changes, optionally optimizing the data for read/write performance
public void rollback()
DIHWriter
If this writer supports transactions or commit points, then roll back any uncommitted changes.
public void doDeleteAll()
DIHWriter
Delete everything from the writer's underlying data store
doDeleteAll
in interface DIHWriter
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.