public interface IndexingConfiguration
IndexingConfiguration
defines 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.Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_BOOST
The default boost: 1.0f.
|
Modifier and Type | Method and Description |
---|---|
AggregateRule[] |
getAggregateRules()
Returns the configured indexing aggregate rules or
null if
none exist. |
float |
getNodeBoost(NodeState state)
Returns the boost for the node scope fulltext index field.
|
org.apache.lucene.analysis.Analyzer |
getPropertyAnalyzer(String fieldName)
Returns the analyzer configured for the property with this fieldName
(the string representation ,JCR-style name, of the given
Name
prefixed with FieldNames.FULLTEXT_PREFIX ),
and null if none is configured, or the configured analyzer
cannot be found. |
float |
getPropertyBoost(NodeState state,
Name propertyName)
Returns the boost value for the given property name.
|
void |
init(Element config,
QueryHandlerContext context,
NamespaceMappings namespaceMappings)
Initializes the configuration.
|
boolean |
isIncludedInNodeScopeIndex(NodeState state,
Name propertyName)
Returns
true if the property with the given name should be
included in the node scope fulltext index. |
boolean |
isIndexed(NodeState state,
Name propertyName)
Returns
true if the property with the given name is indexed
according to this configuration. |
boolean |
useInExcerpt(NodeState state,
Name propertyName)
Returns
true if the content of the property with the given
name should show up in an excerpt. |
static final float DEFAULT_BOOST
void init(Element config, QueryHandlerContext context, NamespaceMappings namespaceMappings) throws Exception
config
- the document element of the configuration DOM.context
- the context of the query handler.namespaceMappings
- the namespaceMappings.Exception
- if initialization fails.AggregateRule[] getAggregateRules()
null
if
none exist. The caller must not modify the returned array!null
if none exist.boolean isIndexed(NodeState state, Name propertyName)
true
if the property with the given name is indexed
according to this configuration.state
- the node state.propertyName
- the name of a property.true
if the property is indexed; false
otherwise.boolean isIncludedInNodeScopeIndex(NodeState state, Name propertyName)
true
if the property with the given name should be
included in the node scope fulltext index. If there is no configuration
entry for that property false
is returned.state
- the node state.propertyName
- the name of a property.true
if the property should be included in the node
scope fulltext index.boolean useInExcerpt(NodeState state, Name propertyName)
true
if the content of the property with the given
name should show up in an excerpt. If there is no configuration entry for
that property true
is returned.state
- the node state.propertyName
- the name of a property.true
if the content of the property should be
included in an excerpt; false
otherwise.float getPropertyBoost(NodeState state, Name propertyName)
DEFAULT_BOOST
is
returned.state
- the node state.propertyName
- the name of a property.float getNodeBoost(NodeState state)
state
- the node state.org.apache.lucene.analysis.Analyzer getPropertyAnalyzer(String fieldName)
Name
prefixed with FieldNames.FULLTEXT_PREFIX
),
and null
if none is configured, or the configured analyzer
cannot be found. If null
is returned, the default Analyzer
is used.fieldName
- the string representation ,JCR-style name, of the given Name
,
prefixed with FieldNames.FULLTEXT_PREFIX
)analyzer
to use for indexing this propertyCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.