public interface Indexer
Indexer
stores Escenic content in a searchable index.Modifier and Type | Interface and Description |
---|---|
static class |
Indexer.IndexBoundary
Signifying the boundary case for start row
|
Modifier and Type | Method and Description |
---|---|
void |
add(IndexBean pBean)
Add a search object.
|
void |
cleanup()
Marks deleted content as deleted also in the search index.
|
void |
delete(IndexBean pBean)
Deletes a search object.
|
void |
delete(neo.dbaccess.Transaction pTransaction,
ProtectionDomain pProtectionDomain)
Deletes all index beans in the given
ProtectionDomain |
void |
delete(neo.dbaccess.Transaction pTransaction,
Section pSection)
Deletes all index beans in the given
Section and all it's subsections recursively. |
IndexBean |
getIndexBean(int pObjectId,
String pObjectType)
Retrieve
IndexBean |
Map<Integer,IndexBean> |
getIndexBeansForPool(int pStartRow,
int pRows,
Indexer.IndexBoundary pBoundary,
String pPoolType,
int pPoolId)
Returns index beans from persistent storage for a supplied pool id.
|
Map<Integer,IndexBean> |
getIndexBeansForProtectionDomain(int pStartRow,
int pRows,
Indexer.IndexBoundary pBoundary,
ProtectionDomain... pProtectionDomains)
Retrieves
beans from persistent storage such that it matches any one of
the supplied protection domains. |
Map<Integer,IndexBean> |
getIndexBeansForPublication(int pStartRow,
int pRows,
boolean pIncludeStructuralChanges,
Indexer.IndexBoundary pBoundary,
int pPublicationId)
Retrieves
beans from persistent storage such that it matches the supplied publicationid. |
void |
indexMissingEntries()
Indexes all missing entries
|
void |
indexMissingEntries(Timestamp pModifiedAfter)
Indexes all missing entries that has been modified after the given timestamp
|
void |
insertSearchContent(List<IndexBean> pBeans)
Used internally to insert any content objects that does not exist.
|
String |
lock()
Locks the indexer.
|
void |
purgeDeletedItems()
Ensure all deleted items are removed from the index
|
void |
reIndex()
Build the index from scratch.
|
void |
reIndex(Section pSection)
Reindex the given section and all it's subsections.
|
void |
reIndex(Section pSection,
boolean pOnlySameProtectionDomain)
Reindex the given section and all it's subsections.
|
void |
reIndexTag()
Build the index from scratch only for tag.
|
void |
release(String pLock)
Releases the lock on the indexer and makes it possible for other processes to be able to work with the index
|
Iterator<neo.util.bus.Payload> |
stream(int pLastEventId)
Retrieve all the payloads after the given eventId as an iterator.
|
void |
sync()
Synchronizes the index
|
void |
update(IndexBean pBean)
Update a search object.
|
void |
updateSearchIndex(IndexBean pIndexBean) |
void reIndex() throws PersistentStoreException
PersistentStoreException
- if something failsvoid sync() throws PersistentStoreException
PersistentStoreException
- if something failsvoid delete(IndexBean pBean) throws PersistentStoreException
pBean
- the object to deletePersistentStoreException
- if something failsvoid add(IndexBean pBean) throws PersistentStoreException
pBean
- the object to addPersistentStoreException
- if something failsvoid update(IndexBean pBean) throws PersistentStoreException
pBean
- the object to updatePersistentStoreException
- if something failsvoid reIndex(Section pSection) throws PersistentStoreException
pSection
- the section to reindexPersistentStoreException
- if something failsvoid reIndex(Section pSection, boolean pOnlySameProtectionDomain) throws PersistentStoreException
pSection
- the section to reindexpOnlySameProtectionDomain
- if true, the method will only reindex the section in the same protection domain as the given section.
Note that the section does not have to be a protection domain itselfPersistentStoreException
- if something failsvoid reIndexTag() throws PersistentStoreException
PersistentStoreException
- if something failsvoid purgeDeletedItems() throws PersistentStoreException
PersistentStoreException
- if something failsvoid indexMissingEntries()
void indexMissingEntries(Timestamp pModifiedAfter)
void cleanup()
String lock()
release(String)
when they are done.void release(String pLock)
pLock
- the lock obtained by lock()
Map<Integer,IndexBean> getIndexBeansForProtectionDomain(int pStartRow, int pRows, Indexer.IndexBoundary pBoundary, ProtectionDomain... pProtectionDomains)
beans
from persistent storage such that it matches any one of
the supplied protection domains.pStartRow
- The row place holder to start with relative topRows
- Maximum number of rows to fetchpBoundary
- Boundary condition to check against for placeholderpProtectionDomains
- The protection domains to get index beans for.beans
matching any of the
pProtectionDomainsIllegalArgumentException
- If pProtectionDomains is null or empty or has any blank valueMap<Integer,IndexBean> getIndexBeansForPublication(int pStartRow, int pRows, boolean pIncludeStructuralChanges, Indexer.IndexBoundary pBoundary, int pPublicationId)
beans
from persistent storage such that it matches the supplied publicationid.pStartRow
- The row place holder to start with relative topRows
- Maximum number of rows to fetchpBoundary
- Boundary condition to check against for placeholderpPublicationId
- The id of the publication to get index beans for.pIncludeStructuralChanges
- Include structural changes (or
incidental changes if you will) instead of changes to the content
items themselves. Structural changes are changes are for example if a
section is moved, then all sub sections and content items
belonging to that section will be included in the structural
changes result set.beans
matching any of the
pProtectionDomainsIllegalArgumentException
- If pProtectionDomains is null or empty or has any blank valueMap<Integer,IndexBean> getIndexBeansForPool(int pStartRow, int pRows, Indexer.IndexBoundary pBoundary, String pPoolType, int pPoolId)
pStartRow
- the row place holder to start with relative to.pRows
- the maximum number of rows to fetch.pBoundary
- the boundary condition to check against for place holder.pPoolType
- the type of the pool.pPoolId
- the id of the pool.void insertSearchContent(List<IndexBean> pBeans) throws SQLException
pBeans
- - the list of objects to insert.SQLException
- - if an error occurs while trying to insert the objectsIndexBean getIndexBean(int pObjectId, String pObjectType)
IndexBean
pObjectId
- object id to retrievepObjectType
- object type to retrieveIndexBean
IllegalArgumentException
- If pObjectId is a non-positive number and pObjectType is null or empty or has any blank valuevoid delete(neo.dbaccess.Transaction pTransaction, ProtectionDomain pProtectionDomain) throws SQLException
ProtectionDomain
pTransaction
- - the transaction to participate inpProtectionDomain
- - the ProtectionDomain
to remove the beans fromSQLException
- if moving the beans failsvoid delete(neo.dbaccess.Transaction pTransaction, Section pSection) throws SQLException
Section
and all it's subsections recursively. This method
will only remove index beans in section which has the same protection domain as the given section.pTransaction
- - the transaction to participate inpSection
- - the Section
to remove the beans fromSQLException
- if moving the beans failsIterator<neo.util.bus.Payload> stream(int pLastEventId) throws SQLException
Iterator.hasNext()
will return falsepLastEventId
- the id of the last eventSQLException
- if retrieving the payloads fail© 1998- 2018 Stibo DX