Package lumis.portal.bigdata
Interface IBigDataIndexer
-
- All Known Subinterfaces:
IBatchIndexer
,IBigDataRepository
,IBigDataRepositorySPI
- All Known Implementing Classes:
ElasticsearchRepository
@StableMinor(version="14.0", sinceVersion="8.1") public interface IBigDataIndexer
Provides big data indexing operations.
Unless specified, the indexing operations may be asynchronous. Hence, the indexing actions may not be available just after the action has been called, and there's no guarantee the requested actions will, indeed, be succeeded.- Since:
- 8.1.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDocument(Document document)
Adds a document to the index.void
addOrUpdateDocument(Document document)
Adds or updates a document on the index.void
deleteDocument(DocumentType documentType, Locale locale, String documentId)
Deletes a document from the index with the given specifications.void
deleteDocumentsByFieldValue(String fieldId, Object... values)
Deletes documents that are matched by one of the given values in the field of given field identifier.void
deleteDocumentsByFieldValue(String fieldId, Collection<?> values)
Deletes documents that are matched by one of the given values in the field of given field identifier.void
deleteDocumentsByQuery(SearchQuery searchQuery)
Deletes documents that are matched by the given search query.
The search query'ssorts
,initial hit
andmaximum hit count
will be ignored.void
updateDocumentsByQuerySync(SearchQuery searchQuery, Map<String,Object> fieldValues)
Updates documents that matches aSearchQuery
updating their field values according to thefieldValues
map.
-
-
-
Method Detail
-
addDocument
void addDocument(Document document)
Adds a document to the index. If in the index already exists a document with the same document type, identifier and locale then this operation will fail (probably without throwing any exception, since the fail may occur in background as this method may be asynchronous).- Parameters:
document
- thedocument
to be added.- Since:
- 8.1.0
- See Also:
addOrUpdateDocument(Document)
-
addOrUpdateDocument
void addOrUpdateDocument(Document document)
Adds or updates a document on the index. If in the index already exists a document with the same document type, identifier and locale then the document on the index will be replaced by the given document; otherwise the given document will be added to the index.- Parameters:
document
- thedocument
to be added.- Since:
- 11.0.0
- See Also:
addDocument(Document)
-
deleteDocument
void deleteDocument(DocumentType documentType, Locale locale, String documentId)
Deletes a document from the index with the given specifications. If no such document exists, this method does nothing.- Parameters:
documentType
- the document's type.locale
- the document's locale as set in its standard locale field. Must benull
if the document does not have a locale specified.documentId
- the document's identifier.- Since:
- 11.0.0
-
deleteDocumentsByFieldValue
void deleteDocumentsByFieldValue(String fieldId, Object... values)
Deletes documents that are matched by one of the given values in the field of given field identifier.- Parameters:
fieldId
- the field identifier.values
- the values.- Since:
- 8.1.0
-
deleteDocumentsByFieldValue
void deleteDocumentsByFieldValue(String fieldId, Collection<?> values)
Deletes documents that are matched by one of the given values in the field of given field identifier.- Parameters:
fieldId
- the field identifier.values
- the values.- Since:
- 8.1.0
-
deleteDocumentsByQuery
void deleteDocumentsByQuery(SearchQuery searchQuery)
Deletes documents that are matched by the given search query.
The search query'ssorts
,initial hit
andmaximum hit count
will be ignored.- Parameters:
searchQuery
- the search query.- Since:
- 8.1.0
-
updateDocumentsByQuerySync
void updateDocumentsByQuerySync(SearchQuery searchQuery, Map<String,Object> fieldValues)
Updates documents that matches aSearchQuery
updating their field values according to thefieldValues
map.This operation is synchronous in relation to the completion of the update execution. Searches performed after this method returns may not reflect the update, since internal optimizations and behavior of the underlying big data storage may demand some time for the update to be visible to searches.
- Parameters:
searchQuery
- the search query.fieldValues
- a map where the key is a field's full identifier and the value is the value to be set on the corresponding field. The value must be of a type compatible with the field type. If the value isnull
,- Since:
- 11.0.0
-
-