Package com.day.cq.search.suggest
Interface SuggestionIndexManager
public interface SuggestionIndexManager
Service interface for managing
SuggestionIndexes, e.g. reading,
creating and deleting them.-
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Deprecated.use the variant with a session:get(Session, String)Gets or creates a suggestion index.list()Deprecated.use the variant with a session:list(Session)Lists the available suggestions indexes.
-
Method Details
-
get
Gets or creates a suggestion index. The index will be created on demand when the first term is added.Note: make sure to
closethe index after usage to properly release affected resources, e.g. the underlying JCR session. This should be done in a try/finally block.The returned index is not thread-safe.
- Parameters:
session- session for reading (or writing) the indexname- name or path of the index- Returns:
- a suggestion index
- Throws:
RepositoryException- if an unexpected repository problem occurred
-
list
Lists the available suggestions indexes.If the indexes were created with path names in
get(String), these will always be returned as relative paths, ie. without a leading slash. Both variants, "/index" and "index" will work withget(String)anddelete(String).- Parameters:
session- session for listing the indexes- Returns:
- a list of index names (relative paths)
- Throws:
RepositoryException- if an unexpected repository problem occurred
-
get
Deprecated.use the variant with a session:get(Session, String)- Throws:
RepositoryException
-
delete
Deprecated.useget(session, name).delete()- Throws:
RepositoryException
-
list
Deprecated.use the variant with a session:list(Session)- Throws:
RepositoryException
-
get(session, name).delete()