public class IndexingConfigurationImpl extends Object implements IndexingConfiguration, NodeTypeRegistryListener
IndexingConfigurationImpl
implements a concrete indexing
configuration.DEFAULT_BOOST
Constructor and Description |
---|
IndexingConfigurationImpl() |
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 nsMappings)
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 fulltext
indexed according to this configuration. |
void |
nodeTypeRegistered(Name ntName)
Called when a node type has been registered.
|
void |
nodeTypeReRegistered(Name ntName)
Called when a node type has been re-registered.
|
void |
nodeTypesUnregistered(Collection<Name> names)
Called when a set of node types has been unregistered.
|
boolean |
useInExcerpt(NodeState state,
Name propertyName)
Returns
true if the content of the property with the given
name should show up in an excerpt. |
public void init(Element config, QueryHandlerContext context, NamespaceMappings nsMappings) throws Exception
init
in interface IndexingConfiguration
config
- the document element of the configuration DOM.context
- the context of the query handler.nsMappings
- the namespaceMappings.Exception
- if initialization fails.public AggregateRule[] getAggregateRules()
null
if
none exist.getAggregateRules
in interface IndexingConfiguration
null
if none exist.public boolean isIndexed(NodeState state, Name propertyName)
true
if the property with the given name is fulltext
indexed according to this configuration.isIndexed
in interface IndexingConfiguration
state
- the node state.propertyName
- the name of a property.true
if the property is fulltext indexed;
false
otherwise.public float getPropertyBoost(NodeState state, Name propertyName)
IndexingConfiguration.DEFAULT_BOOST
is
returned.getPropertyBoost
in interface IndexingConfiguration
state
- the node state.propertyName
- the name of a property.public float getNodeBoost(NodeState state)
getNodeBoost
in interface IndexingConfiguration
state
- the node state.public 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 not configuration
entry for that propery false
is returned.isIncludedInNodeScopeIndex
in interface IndexingConfiguration
state
- the node state.propertyName
- the name of a property.true
if the property should be included in the node
scope fulltext index.public 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.useInExcerpt
in interface IndexingConfiguration
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.public 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.getPropertyAnalyzer
in interface IndexingConfiguration
fieldName
- the string representation ,JCR-style name, of the given Name
prefixed with FieldNames.FULLTEXT_PREFIX
))analyzer
to use for indexing this propertypublic void nodeTypeRegistered(Name ntName)
NodeTypeRegistryListener
nodeTypeRegistered
in interface NodeTypeRegistryListener
ntName
- name of the node type that has been registeredpublic void nodeTypeReRegistered(Name ntName)
NodeTypeRegistryListener
nodeTypeReRegistered
in interface NodeTypeRegistryListener
ntName
- name of the node type that has been registeredpublic void nodeTypesUnregistered(Collection<Name> names)
NodeTypeRegistryListener
nodeTypesUnregistered
in interface NodeTypeRegistryListener
names
- names of the types that have been unregisteredCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.