public abstract class SearchContext extends Object
The class must be initialized
before being called.
Constructor and Description |
---|
SearchContext() |
Modifier and Type | Method and Description |
---|---|
static Node |
getCriteriaNode(String criteriaId)
Returns the criteria
node for a content criteria, which is used to check
certain criteria against a SearchContent and eventually use a configuration defined
specifically to this criteria. |
static Node |
getIndexerConfigNode(String searchEngineId,
String indexerId)
Returns the configuration
node for one of the search engine's indexers. |
static Node[] |
getIndexerConfigNodes(String searchEngineId)
Returns the configuration
node s for all indexers of a search engine. |
static Node |
getSearchEngineConfigNode(String searchEngineId)
Returns the configuration
node for the a search engine. |
static Node |
getSearcherConfigNode(String searchEngineId,
String searcherId)
Returns the configuration
node for one of the search engine's searchers. |
static Node[] |
getSearcherConfigNodes(String searchEngineId)
Returns the configuration
node s for all searchers of a search engine. |
static void |
init(String searchConfigPath)
Initialize the search context.
|
public static void init(String searchConfigPath) throws PortalException
searchconfig.xml
.
This method must be callled once before calls to any other method can be made, or a SearchException
will be thrown.
searchConfigPath
- path to the configuration file searchconfig.xml
.PortalException
public static Node getSearchEngineConfigNode(String searchEngineId) throws PortalException
node
for the a search engine.
If the search engine was not specified (passing null as argument), the default search engine will be used (which is the first declared in the configuration file).
searchEngineId
- search engine identifier, or null for the default search enginenode
for the search enginePortalException
- if the context was not initialized or the given search engine was not found in the configuration.public static Node getIndexerConfigNode(String searchEngineId, String indexerId) throws PortalException
node
for one of the search engine's indexers.
If the search engine was not specified (passing null as argument), the default search engine will be used (which is the first declared in the configuration file).
If the indexer was not specified (passing null as argument), the default indexer will be used (which is the first declared in the search engine configuration).
searchEngineId
- search engine identifier, or null for the default search engineindexerId
- indexer identifier, or null for the default indexer of the search enginenode
for the indexerPortalException
- if the context was not initialized or the given search engine or the indexer was not found in the configuration.public static Node[] getIndexerConfigNodes(String searchEngineId) throws PortalException
node
s for all indexers of a search engine.searchEngineId
- search engine identifier, or null for the default search enginenode
s for the indexersPortalException
- if the context was not initialized or the given search engine was not found in the configuration.public static Node getSearcherConfigNode(String searchEngineId, String searcherId) throws PortalException
node
for one of the search engine's searchers.
If the search engine was not specified (passing null as argument), the default search engine will be used (which is the first declared in the configuration file).
If the searcher was not specified (passing null as argument), the default searcher will be used (which is the first declared in the search engine configuration).
searchEngineId
- search engine identifier, or null for the default search enginesearcherId
- searcher identifier, or null for the default searcher of the search enginenode
for the searcherPortalException
- if the context was not initialized or the given search engine or the searcher was not found in the configuration.public static Node[] getSearcherConfigNodes(String searchEngineId) throws PortalException
node
s for all searchers of a search engine.searchEngineId
- search engine identifier, or null for the default search enginenode
s for the searchersPortalException
- if the context was not initialized or the given search engine was not found in the configuration.public static Node getCriteriaNode(String criteriaId) throws PortalException
node
for a content criteria, which is used to check
certain criteria against a SearchContent
and eventually use a configuration defined
specifically to this criteria.criteriaId
- criteria identificationnode
PortalException
Lumisportal 7.1.1.140331 - Copyright © 2006–2014 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.