Package org.sakaiproject.search.api
Interface SearchIndexBuilder
-
- All Known Subinterfaces:
SiteSearchIndexBuilder
public interface SearchIndexBuilderA SearchIndexBuilder builds a search index, it must manage its own list of pending documents and should probably do this in a separate thread- Author:
- ieb
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_INDEX_BUILDER_NAMEstatic StringDEFAULT_INDEX_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddResource(Notification notification, Event event)Adds a resource to the index buildervoiddestroy()Close down the entire search infrastructureList<SearchBuilderItem>getAllSearchItems()get a list of all entitied in the search indexList<EntityContentProducer>getContentProducers()Get all the producers registered, as a clone to avoid concurrent modification exceptionsList<SearchBuilderItem>getGlobalMasterSearchItems()get a list of global search itemsStringgetName()Access the logical, well-known name of this index builder.intgetPendingDocuments()get the number of pending documentsbooleanisBuildQueueEmpty()Does the Queue contain work to do.EntityContentProducernewEntityContentProducer(String ref)get an entity content producer that can handle the referenceEntityContentProducernewEntityContentProducer(Event event)get an entity content producer that can handle the eventvoidrebuildIndex()rebuild the index completely from scratchvoidrefreshIndex()Refresh the index based on the registered entitiesvoidregisterEntityContentProducer(EntityContentProducer ecp)Register an implementation-specific indexable content producer instance with thisSearchIndexBuilder.
-
-
-
Field Detail
-
DEFAULT_INDEX_BUILDER_NAME
static final String DEFAULT_INDEX_BUILDER_NAME
- See Also:
- Constant Field Values
-
DEFAULT_INDEX_NAME
static final String DEFAULT_INDEX_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Access the logical, well-known name of this index builder. This name may be distinct from the phyisical name of the index this builder manages, and may be cached bySearchServiceas a key for index-specific search queries.- Returns:
-
addResource
void addResource(Notification notification, Event event)
Adds a resource to the index builder- Parameters:
notification-event-
-
registerEntityContentProducer
void registerEntityContentProducer(EntityContentProducer ecp)
Register an implementation-specific indexable content producer instance with thisSearchIndexBuilder.- Parameters:
ecp-
-
refreshIndex
void refreshIndex()
Refresh the index based on the registered entities
-
rebuildIndex
void rebuildIndex()
rebuild the index completely from scratch
-
isBuildQueueEmpty
boolean isBuildQueueEmpty()
Does the Queue contain work to do.- Returns:
-
getContentProducers
List<EntityContentProducer> getContentProducers()
Get all the producers registered, as a clone to avoid concurrent modification exceptions- Returns:
-
destroy
void destroy()
Close down the entire search infrastructure
-
getPendingDocuments
int getPendingDocuments()
get the number of pending documents- Returns:
-
getAllSearchItems
List<SearchBuilderItem> getAllSearchItems()
get a list of all entitied in the search index- Returns:
-
newEntityContentProducer
EntityContentProducer newEntityContentProducer(Event event)
get an entity content producer that can handle the event- Parameters:
event-- Returns:
-
newEntityContentProducer
EntityContentProducer newEntityContentProducer(String ref)
get an entity content producer that can handle the reference- Parameters:
ref-- Returns:
-
getGlobalMasterSearchItems
List<SearchBuilderItem> getGlobalMasterSearchItems()
get a list of global search items- Returns:
-
-