Interface IndexingConfiguration
-
- All Known Implementing Classes:
IndexingConfigurationImpl
public interface IndexingConfigurationIndexingConfigurationdefines the interface to check whether a certain property is indexed or not. This interface also provides access to aggregate rules. Those define how node indexes are combined into an aggregate to form a single node index that can be queried.
-
-
Field Summary
Fields Modifier and Type Field Description static floatDEFAULT_BOOSTThe default boost: 1.0f.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AggregateRule[]getAggregateRules()Returns the configured indexing aggregate rules ornullif none exist.floatgetNodeBoost(NodeState state)Returns the boost for the node scope fulltext index field.AnalyzergetPropertyAnalyzer(String fieldName)Returns the analyzer configured for the property with this fieldName (the string representation ,JCR-style name, of the givenNameprefixed withFieldNames.FULLTEXT_PREFIX), andnullif none is configured, or the configured analyzer cannot be found.floatgetPropertyBoost(NodeState state, Name propertyName)Returns the boost value for the given property name.voidinit(Element config, QueryHandlerContext context, NamespaceMappings namespaceMappings)Initializes the configuration.booleanisIncludedInNodeScopeIndex(NodeState state, Name propertyName)Returnstrueif the property with the given name should be included in the node scope fulltext index.booleanisIndexed(NodeState state, Name propertyName)Returnstrueif the property with the given name is indexed according to this configuration.booleanuseInExcerpt(NodeState state, Name propertyName)Returnstrueif the content of the property with the given name should show up in an excerpt.
-
-
-
Field Detail
-
DEFAULT_BOOST
static final float DEFAULT_BOOST
The default boost: 1.0f.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
void init(Element config, QueryHandlerContext context, NamespaceMappings namespaceMappings) throws Exception
Initializes the configuration.- Parameters:
config- the document element of the configuration DOM.context- the context of the query handler.namespaceMappings- the namespaceMappings.- Throws:
Exception- if initialization fails.
-
getAggregateRules
AggregateRule[] getAggregateRules()
Returns the configured indexing aggregate rules ornullif none exist. The caller must not modify the returned array!- Returns:
- the configured rules or
nullif none exist.
-
isIndexed
boolean isIndexed(NodeState state, Name propertyName)
Returnstrueif the property with the given name is indexed according to this configuration.- Parameters:
state- the node state.propertyName- the name of a property.- Returns:
trueif the property is indexed;falseotherwise.
-
isIncludedInNodeScopeIndex
boolean isIncludedInNodeScopeIndex(NodeState state, Name propertyName)
Returnstrueif the property with the given name should be included in the node scope fulltext index. If there is no configuration entry for that propertyfalseis returned.- Parameters:
state- the node state.propertyName- the name of a property.- Returns:
trueif the property should be included in the node scope fulltext index.
-
useInExcerpt
boolean useInExcerpt(NodeState state, Name propertyName)
Returnstrueif the content of the property with the given name should show up in an excerpt. If there is no configuration entry for that propertytrueis returned.- Parameters:
state- the node state.propertyName- the name of a property.- Returns:
trueif the content of the property should be included in an excerpt;falseotherwise.
-
getPropertyBoost
float getPropertyBoost(NodeState state, Name propertyName)
Returns the boost value for the given property name. If there is no configuration entry for the property name theDEFAULT_BOOSTis returned.- Parameters:
state- the node state.propertyName- the name of a property.- Returns:
- the boost value for the property.
-
getNodeBoost
float getNodeBoost(NodeState state)
Returns the boost for the node scope fulltext index field.- Parameters:
state- the node state.- Returns:
- the boost for the node scope fulltext index field.
-
getPropertyAnalyzer
Analyzer getPropertyAnalyzer(String fieldName)
Returns the analyzer configured for the property with this fieldName (the string representation ,JCR-style name, of the givenNameprefixed withFieldNames.FULLTEXT_PREFIX), andnullif none is configured, or the configured analyzer cannot be found. Ifnullis returned, the default Analyzer is used.- Parameters:
fieldName- the string representation ,JCR-style name, of the givenName, prefixed withFieldNames.FULLTEXT_PREFIX)- Returns:
- the
analyzerto use for indexing this property
-
-