Package org.fcrepo.search.api
Interface SearchIndex
-
- All Known Implementing Classes:
DbSearchIndexImpl
,SearchIndexMetrics
public interface SearchIndex
An interface defining search index management operations- Author:
- dbernstein
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addUpdateIndex(Transaction transaction, ResourceHeaders resourceHeaders)
Adds or updates the index with the resource header information.void
commitTransaction(Transaction tx)
Commit the changes made in the transaction.SearchResult
doSearch(SearchParameters parameters)
Performs a search based on the parameters and returns the result.void
removeFromIndex(Transaction transaction, FedoraId fedoraId)
Removes indexed fields associated with the specified Fedora IDvoid
reset()
Remove all persistent state associated with the index.void
rollbackTransaction(Transaction tx)
Rollback the changes in the transaction.
-
-
-
Method Detail
-
addUpdateIndex
void addUpdateIndex(Transaction transaction, 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(Transaction transaction, FedoraId fedoraId)
Removes indexed fields associated with the specified Fedora ID- Parameters:
transaction
- The transactionfedoraId
- The Fedora ID
-
doSearch
SearchResult doSearch(SearchParameters parameters) throws InvalidQueryException
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
void commitTransaction(Transaction tx)
Commit the changes made in the transaction.- Parameters:
tx
- The transaction .
-
rollbackTransaction
void rollbackTransaction(Transaction tx)
Rollback the changes in the transaction.- Parameters:
tx
- The transaction.
-
-