Package org.fcrepo.search.api
Interface SearchIndex
public interface SearchIndex
An interface defining search index management operations
- Author:
- dbernstein
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddUpdateIndex(org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.kernel.api.models.ResourceHeaders resourceHeaders) Adds or updates the index with the resource header information.voidClear all transactions in the search index.voidcommitTransaction(org.fcrepo.kernel.api.Transaction tx) Commit the changes made in the transaction.doSearch(SearchParameters parameters) Performs a search based on the parameters and returns the result.voidremoveFromIndex(org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.kernel.api.identifiers.FedoraId fedoraId) Removes indexed fields associated with the specified Fedora IDvoidreset()Remove all persistent state associated with the index.voidrollbackTransaction(org.fcrepo.kernel.api.Transaction tx) Rollback the changes in the transaction.
-
Method Details
-
addUpdateIndex
void addUpdateIndex(org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.kernel.api.models.ResourceHeaders resourceHeaders) Adds or updates the index with the resource header information.- Parameters:
transaction- The externally generated transaction.resourceHeaders- The resource headers associated with the resource
-
removeFromIndex
void removeFromIndex(org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.kernel.api.identifiers.FedoraId fedoraId) Removes indexed fields associated with the specified Fedora ID- Parameters:
transaction- The transactionfedoraId- The Fedora ID
-
doSearch
Performs a search based on the parameters and returns the result.- Parameters:
parameters- The parameters defining the search- Returns:
- The result of the search
- Throws:
InvalidQueryException
-
reset
void reset()Remove all persistent state associated with the index. -
commitTransaction
Commit the changes made in the transaction.- Parameters:
tx- The transaction .
-
rollbackTransaction
Rollback the changes in the transaction.- Parameters:
tx- The transaction.
-
clearAllTransactions
void clearAllTransactions()Clear all transactions in the search index.
-