Package lumis.portal.bigdata
Interface IBigDataRepository
-
- All Superinterfaces:
IBigDataIndexer
,IBigDataSearcher
- All Known Subinterfaces:
IBigDataRepositorySPI
- All Known Implementing Classes:
ElasticsearchRepository
@StableMinor(version="17.0", 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$ $Date$
- 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(java.lang.String documentTypeId)
Deletes a given document type from managed indices.java.lang.Object
getDelegate()
Deprecated.Since 16.1.0 replaced bygetDelegate(Class)
to allow to specify the type of the expected implementation.<T> T
getDelegate(java.lang.Class<T> type)
Returns an underlying big data implementation object, if available.DocumentType
getDocumentType(java.lang.String documentTypeId)
Returns the document type of the given identifier.DocumentTypeField
getDocumentTypeField(java.lang.String documentTypeFieldFullId)
Return the document type field of the field that has the given identifier.Document
readDocument(DocumentType documentType, java.util.Locale locale, java.lang.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:
java.lang.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(java.lang.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(java.lang.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(java.lang.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, java.util.Locale locale, java.lang.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
@Deprecated java.lang.Object getDelegate()
Deprecated.Since 16.1.0 replaced bygetDelegate(Class)
to allow to specify the type of the expected implementation.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
-
getDelegate
<T> T getDelegate(java.lang.Class<T> type)
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.
- Parameters:
type
- the type of the underlying big data implementation object to be returned.- Returns:
- the underlying big data implementation object, if available.
- Since:
- 16.1.0
-
-