public class FieldSearchSQLImpl extends Object implements FieldSearch
| Modifier and Type | Field and Description |
|---|---|
static String[] |
DB_COLUMN_NAMES |
static String[] |
DB_COLUMN_NAMES_NODC |
| Constructor and Description |
|---|
FieldSearchSQLImpl(ConnectionPool cPool,
RepositoryReader repoReader,
int maxResults,
int maxSecondsPerSession)
Construct a FieldSearchSQLImpl that indexes DC fields.
|
FieldSearchSQLImpl(ConnectionPool cPool,
RepositoryReader repoReader,
int maxResults,
int maxSecondsPerSession,
boolean indexDCFields)
Construct a FieldSearchSQLImpl that indexes DC fields only if specified.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(String pid)
Remove an object from the search indexes.
|
FieldSearchResult |
findObjects(String[] resultFields,
int maxResults,
FieldSearchQuery query)
Search across specific fields and return the desired fields.
|
FieldSearchResult |
resumeFindObjects(String sessionToken)
Resume an in-progress search across specific fields and return the
desired fields.
|
void |
update(DOReader reader)
Update the search indexes with information from the provided DOReader.
|
public static String[] DB_COLUMN_NAMES
public static String[] DB_COLUMN_NAMES_NODC
public FieldSearchSQLImpl(ConnectionPool cPool, RepositoryReader repoReader, int maxResults, int maxSecondsPerSession)
cPool - the ConnectionPool with connections to the db containing the
fieldsrepoReader - the RepositoryReader to use when getting the original values of
the fieldsmaxResults - the maximum number of results to return at a time, regardless of
what the user might requestmaxSecondsPerSession - maximum number of seconds per session.public FieldSearchSQLImpl(ConnectionPool cPool, RepositoryReader repoReader, int maxResults, int maxSecondsPerSession, boolean indexDCFields)
cPool - the ConnectionPool with connections to the db containing the
fieldsrepoReader - the RepositoryReader to use when getting the original values of
the fieldsmaxResults - the maximum number of results to return at a time, regardless of
what the user might requestmaxSecondsPerSession - maximum number of seconds per session.indexDCFields - whether DC field values should be examined and updated in the
database. If false, queries will behave as if no values had been
specified for the DC fields.public void update(DOReader reader) throws ServerException
FieldSearchupdate in interface FieldSearchreader - the DOReader containing all the field information for the objectServerException - if anything went wrongpublic boolean delete(String pid) throws ServerException
FieldSearchdelete in interface FieldSearchpid - the unique id of the object whose info should be removedServerException - if anything went wrongpublic FieldSearchResult findObjects(String[] resultFields, int maxResults, FieldSearchQuery query) throws UnrecognizedFieldException, ObjectIntegrityException, RepositoryConfigurationException, StreamIOException, ServerException, StorageDeviceException
FieldSearchfindObjects in interface FieldSearchresultFields - the desired fieldsmaxResults - the maximum number of results the client wantsquery - the queryServerException - if anything went wrongUnrecognizedFieldExceptionObjectIntegrityExceptionRepositoryConfigurationExceptionStreamIOExceptionStorageDeviceExceptionpublic FieldSearchResult resumeFindObjects(String sessionToken) throws UnrecognizedFieldException, ObjectIntegrityException, RepositoryConfigurationException, StreamIOException, ServerException, UnknownSessionTokenException
FieldSearchresumeFindObjects in interface FieldSearchsessionToken - the token of the session in which the remaining results can be
foundServerException - if anything went wrongUnrecognizedFieldExceptionObjectIntegrityExceptionRepositoryConfigurationExceptionStreamIOExceptionUnknownSessionTokenExceptionCopyright © 2013 DuraSpace. All Rights Reserved.