Interface IndexingConfiguration

  • All Known Implementing Classes:
    IndexingConfigurationImpl

    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.
    • 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 or null if none exist. The caller must not modify the returned array!
        Returns:
        the configured rules or null if none exist.
      • isIndexed

        boolean isIndexed​(NodeState state,
                          Name propertyName)
        Returns true if the property with the given name is indexed according to this configuration.
        Parameters:
        state - the node state.
        propertyName - the name of a property.
        Returns:
        true if the property is indexed; false otherwise.
      • isIncludedInNodeScopeIndex

        boolean isIncludedInNodeScopeIndex​(NodeState state,
                                           Name propertyName)
        Returns 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.
        Parameters:
        state - the node state.
        propertyName - the name of a property.
        Returns:
        true if the property should be included in the node scope fulltext index.
      • useInExcerpt

        boolean useInExcerpt​(NodeState state,
                             Name propertyName)
        Returns 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.
        Parameters:
        state - the node state.
        propertyName - the name of a property.
        Returns:
        true if the content of the property should be included in an excerpt; false otherwise.
      • 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 the DEFAULT_BOOST is 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 given 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.
        Parameters:
        fieldName - the string representation ,JCR-style name, of the given Name, prefixed with FieldNames.FULLTEXT_PREFIX)
        Returns:
        the analyzer to use for indexing this property