org.sakaiproject.entitybroker.entityprovider.extension
Interface SearchProvider

All Known Subinterfaces:
EntityBroker

public interface SearchProvider

Defines the methods related to searching for entities (shared between interfaces), implementing this allows for support for the core EB search functionality

Author:
Aaron Zeckoski (azeckoski@unicon.net)

Method Summary
 boolean add(String reference, SearchContent content)
          Add some content to the search index for a given reference, this will replace existing content (not merge)
 boolean remove(String reference)
           
 void resetSearchIndexes(String context)
          WARNING: this should mostly never be run but it tells the search provider to purge the indexes and to request new search data for the given context
 SearchResults search(QuerySearch query)
          Do a search for entities and get back the listing of results
 

Method Detail

search

SearchResults search(QuerySearch query)
Do a search for entities and get back the listing of results

Parameters:
query - the search query object (allows paging etc.)
Returns:
the search results

add

boolean add(String reference,
            SearchContent content)
Add some content to the search index for a given reference, this will replace existing content (not merge)

Parameters:
reference - a globally unique reference to an entity (e.g. /myprefix/myid), consists of the entity prefix and optional segments (normally the id at least)
content - [OPTIONAL] if null the content will be retrieved by called the Searchable methods, otherwise this will simply index the content it is given into the search system
Returns:
true if added a new search index entry, or false if it replaced an existing one
Throws:
UnsupportedOperationException - if this reference cannot be searched

remove

boolean remove(String reference)
Parameters:
reference - a globally unique reference to an entity (e.g. /myprefix/myid), consists of the entity prefix and optional segments (normally the id at least)
Returns:
true if the index entry was removed, false otherwise

resetSearchIndexes

void resetSearchIndexes(String context)
WARNING: this should mostly never be run but it tells the search provider to purge the indexes and to request new search data for the given context

Parameters:
context - this generally represents either a site or a group in the system


Copyright © 2007-2013 Sakai Project. All Rights Reserved.