Interface ReindexProvider<D>
- Type Parameters:
D
- The type of document which can be written
public interface ReindexProvider<D>
Generic interface for writing a record or document to a particular index, such as Solr.
- Author:
- Kelly Tisdell (ktisdell)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteByField
(String fieldName, String fieldValue, int commitWithinMillis, String... indexNames) Perform a delete operation, deleting by a field name and value.void
Writes a document or record to one or more indices.void
Writes a batch of documents to one or more indices.
-
Method Details
-
write
Writes a document or record to one or more indices.- Parameters:
document
- the document to writeindexNames
- the indices to write to- Throws:
SearchIndexException
- if an error occurs writing to the index
-
write
Writes a batch of documents to one or more indices.- Parameters:
documents
- the documents to writeindexNames
- the indices to write to- Throws:
SearchIndexException
- if an error occurs writing to the index
-
deleteByField
void deleteByField(String fieldName, String fieldValue, int commitWithinMillis, @NonNull String... indexNames) throws SearchIndexException Perform a delete operation, deleting by a field name and value. For example, to delete all documents with a contextId value of "10":deleteByField("contextId", "10", index)
- Parameters:
fieldName
- The field namefieldValue
- The field value.commitWithinMillis
- time to commit within after writeindexNames
- The name of the collections to update.- Throws:
SearchIndexException
- If the delete request fails for any reason.
-