Package lumis.portal.bigdata
Interface IBigDataRepository
-
- All Superinterfaces:
IBigDataIndexer
,IBigDataSearcher
- All Known Subinterfaces:
IBigDataRepositorySPI
- All Known Implementing Classes:
ElasticsearchRepository
@StableMinor(version="14.2", sinceVersion="8.1") public interface IBigDataRepository extends IBigDataIndexer, IBigDataSearcher
Provides big data repository operations. A repository provides operations of bothindexer
andsearcher
.- Since:
- 8.1.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
- See Also:
IBigDataIndexer
,IBigDataSearcher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addOrUpdateDocumentType(DocumentType documentType)
Deprecated.since 11.0.0 replaced byaddOrUpdateDocumentType(DocumentType, boolean)
.void
addOrUpdateDocumentType(DocumentType documentType, boolean force)
Adds or updates a document type into managed indices.
If the managed indices couldn't be updated in underlying big data repository:
Ifforce
parameter istrue
, they will be recreated, causing data loss. Else, anIllegalArgumentException
will be raised.void
deleteDocumentType(String documentTypeId)
Deletes a given document type from managed indices.Object
getDelegate()
Returns an underlying big data implementation object, if available.DocumentType
getDocumentType(String documentTypeId)
Returns the document type of the given identifier.DocumentTypeField
getDocumentTypeField(String documentTypeFieldFullId)
Return the document type field of the field that has the given identifier.Document
readDocument(DocumentType documentType, Locale locale, String documentId)
Reads a document from the repository with the given specifications.IBatchIndexer
startBatch()
Returns an indexer to perform bulk actions.
The caller must assureIBatchIndexer.close()
is called after the desired bulk operations were performed.-
Methods inherited from interface lumis.portal.bigdata.IBigDataIndexer
addDocument, addOrUpdateDocument, deleteDocument, deleteDocumentsByFieldValue, deleteDocumentsByFieldValue, deleteDocumentsByQuery, updateDocumentsByQuerySync
-
Methods inherited from interface lumis.portal.bigdata.IBigDataSearcher
getAutoCompleteSuggestions, search, validate
-
-
-
-
Method Detail
-
startBatch
IBatchIndexer startBatch()
Returns an indexer to perform bulk actions.
The caller must assureIBatchIndexer.close()
is called after the desired bulk operations were performed.Example of usage:
IBatchIndexer batchIndexer = myBigDataRepository.startBatch(); try { // batch operations here } finally { batchIndexer.close(); }
Or using try-with-resources:
try(IBatchIndexer batchIndexer = myBigDataRepository.startBatch()) { // batch operations here } - Returns:
- an indexer to perform bulk actions.
- Since:
- 8.1.0
-
addOrUpdateDocumentType
@Deprecated void addOrUpdateDocumentType(DocumentType documentType)
Deprecated.since 11.0.0 replaced byaddOrUpdateDocumentType(DocumentType, boolean)
. This call is equivalent toaddOrUpdateDocumentType(DocumentType, boolean)
passingforce
true
.Adds or updates a document type into managed indices.
If the managed indices couldn't be updated in underlying big data repository, they will be recreated, causing data loss.- Parameters:
documentType
- the document type to be added.- Since:
- 8.1.0
- See Also:
DocumentTypes
-
addOrUpdateDocumentType
void addOrUpdateDocumentType(DocumentType documentType, boolean force)
Adds or updates a document type into managed indices.
If the managed indices couldn't be updated in underlying big data repository:
- If
force
parameter istrue
, they will be recreated, causing data loss. - Else, an
IllegalArgumentException
will be raised.
- Parameters:
documentType
- the document type to be added.force
- indicates whether the update should be forced.- Throws:
IllegalArgumentException
- if a change in document type is not allowed or the underlying indices couldn't be recreated andforce
isfalse
.- Since:
- 11.0.0
- See Also:
DocumentTypes
- If
-
deleteDocumentType
void deleteDocumentType(String documentTypeId) throws PortalObjectNotFoundException
Deletes a given document type from managed indices.- Parameters:
documentTypeId
- the document type identifier to be deleted.- Throws:
PortalObjectNotFoundException
- if the document type with the given identifier couldn't be found.- Since:
- 8.1.0
-
getDocumentType
DocumentType getDocumentType(String documentTypeId) throws PortalObjectNotFoundException
Returns the document type of the given identifier.- Parameters:
documentTypeId
- the document type identifier.- Returns:
- the document type of the given identifier.
- Throws:
PortalObjectNotFoundException
- if the desired type does not exist.- Since:
- 8.1.0
-
getDocumentTypeField
DocumentTypeField getDocumentTypeField(String documentTypeFieldFullId) throws PortalObjectNotFoundException
Return the document type field of the field that has the given identifier.- Parameters:
documentTypeFieldFullId
- the (full) identifier of the document type field.- Returns:
- the document type field of the field that has the given identifier.
- Throws:
PortalObjectNotFoundException
- if the desired field does not exist.- Since:
- 9.0.0
-
readDocument
Document readDocument(DocumentType documentType, Locale locale, String documentId) throws PortalObjectNotFoundException
Reads a document from the repository with the given specifications.- 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.- Returns:
- the document.
- Throws:
PortalObjectNotFoundException
- if no matching document was found.- Since:
- 11.0.0
-
getDelegate
Object getDelegate()
Returns an underlying big data implementation object, if available. The result of this method is implementation specific and implementations may returnnull
.This method may be used by a repository as a way to expose some extra API to its clients.
- Returns:
- the underlying big data implementation object, if available.
- Since:
- 8.1.0
-
-