fedora.server.search
Interface FieldSearch

All Known Implementing Classes:
FieldSearchSQLImpl, FieldSearchSQLModule

public interface FieldSearch

Title: FieldSearch.java

Description: A provider of a simple field-based search service across all objects in the repository

Key object metadata and dublin core fields are searchable from via implementations of this interface.

Key fields include:

pid, label, cModel, state, ownerId, cDate, mDate, dcmDate

Dublin core fields include:

title, creator, subject, description, publisher, contributor, date, type, format, identifier, source, language, relation, coverage, rights

-----------------------------------------------------------------------------

License and Copyright: The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The entire file consists of original code. Copyright © 2002-2005 by The Rector and Visitors of the University of Virginia and Cornell University. All rights reserved.

-----------------------------------------------------------------------------

Version:
$Id: FieldSearch.java,v 1.14 2005/01/11 20:06:07 cwilper Exp $
Author:
cwilper@cs.cornell.edu

Method Summary
 boolean delete(java.lang.String pid)
          Remove an object from the search indexes.
 FieldSearchResult findObjects(java.lang.String[] resultFields, int maxResults, FieldSearchQuery query)
          Search across specific fields and return the desired fields.
 FieldSearchResult resumeFindObjects(java.lang.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.
 

Method Detail

update

public void update(DOReader reader)
            throws ServerException
Update the search indexes with information from the provided DOReader.

Parameters:
reader - the DOReader containing all the field information for the object
Throws:
ServerException - if anything went wrong

delete

public boolean delete(java.lang.String pid)
               throws ServerException
Remove an object from the search indexes.

Parameters:
pid - the unique id of the object whose info should be removed
Returns:
true if object successfully removed; false otherwise.
Throws:
ServerException - if anything went wrong

findObjects

public FieldSearchResult findObjects(java.lang.String[] resultFields,
                                     int maxResults,
                                     FieldSearchQuery query)
                              throws ServerException
Search across specific fields and return the desired fields.

Parameters:
resultFields - the desired fields
maxResults - the maximum number of results the client wants
query - the query
Returns:
FieldSearchResult the results
Throws:
ServerException - if anything went wrong

resumeFindObjects

public FieldSearchResult resumeFindObjects(java.lang.String sessionToken)
                                    throws ServerException
Resume an in-progress search across specific fields and return the desired fields.

Parameters:
sessionToken - the token of the session in which the remaining results can be found
Returns:
FieldSearchResult the results
Throws:
ServerException - if anything went wrong