Class QueryEngineSettings

    • Field Detail

      • SQL2_OPTIMISATION_FLAG

        public static final String SQL2_OPTIMISATION_FLAG
        the flag used to turn on/off the optimisations on top of the org.apache.jackrabbit.oak.query.Query object. -Doak.query.sql2optimisation
        See Also:
        Constant Field Values
      • SQL2_OPTIMIZATION_2

        public static final boolean SQL2_OPTIMIZATION_2
      • DEFAULT_QUERY_LIMIT_IN_MEMORY

        public static final long DEFAULT_QUERY_LIMIT_IN_MEMORY
      • DEFAULT_QUERY_LIMIT_READS

        public static final long DEFAULT_QUERY_LIMIT_READS
      • FT_OPTIMIZE_IN_RESTRICTIONS_FOR_FUNCTIONS

        public static final String FT_OPTIMIZE_IN_RESTRICTIONS_FOR_FUNCTIONS
        See Also:
        Constant Field Values
      • DEFAULT_PREFETCH_COUNT

        public static final int DEFAULT_PREFETCH_COUNT
      • DEFAULT_FAST_QUERY_SIZE

        public static final boolean DEFAULT_FAST_QUERY_SIZE
    • Constructor Detail

      • QueryEngineSettings

        public QueryEngineSettings()
      • QueryEngineSettings

        public QueryEngineSettings​(StatisticsProvider statisticsProvider)
    • Method Detail

      • getQueryLengthWarnLimit

        public long getQueryLengthWarnLimit()
      • getQueryLengthErrorLimit

        public long getQueryLengthErrorLimit()
      • setPrefetchFeature

        public void setPrefetchFeature​(@Nullable
                                       @Nullable Feature prefetch)
      • setFailTraversal

        public void setFailTraversal​(boolean failTraversal)
        Description copied from interface: QueryEngineSettingsMBean
        Set whether queries that don't use an index will fail (throw an exception).
        Specified by:
        setFailTraversal in interface QueryEngineSettingsMBean
        Parameters:
        failTraversal - the new value for this setting
      • setImprovedIsNullCostFeature

        public void setImprovedIsNullCostFeature​(@Nullable
                                                 @Nullable Feature feature)
      • getImprovedIsNullCost

        public boolean getImprovedIsNullCost()
        Description copied from interface: QueryLimits
        See OAK-10532. This method is used for backward compatibility (bug compatibility) only.
        Specified by:
        getImprovedIsNullCost in interface QueryLimits
        Returns:
        true, except when backward compatibility for OAK-10532 is enabled
      • setOptimizeInRestrictionsForFunctions

        public void setOptimizeInRestrictionsForFunctions​(@Nullable
                                                          @Nullable Feature feature)
      • getOptimizeInRestrictionsForFunctions

        public boolean getOptimizeInRestrictionsForFunctions()
        Description copied from interface: QueryLimits
        See OAK-11214. This method is used for backward compatibility (bug compatibility) only.
        Specified by:
        getOptimizeInRestrictionsForFunctions in interface QueryLimits
        Returns:
        true, except when backward compatibility for OAK-11214 is enabled
      • setStrictPathRestriction

        public void setStrictPathRestriction​(String strictPathRestriction)
        Description copied from interface: QueryEngineSettingsMBean
        Whether path restrictions of indexes (excludedPaths / includedPaths) are taken into account during query execution, for Lucene indexes. When enabled, only indexes are considered if the index path restriction is compatible with the query path restrictions. When disabled, only the queryPaths of the index is taken into account.
        Specified by:
        setStrictPathRestriction in interface QueryEngineSettingsMBean
        Parameters:
        strictPathRestriction - Set path restriction: Expected value is either of ENABLE/DISABLE/WARN ENABLE: enable path restriction- Index won't be used if index definition path restrictions are not compatible with query's path restriction DISABLE: path restrictions are not taken into account while querying WARN: path restrictions are not taken into account but a warning will be logged if query path restrictions are not compatible with index path restrictions
      • setFullTextComparisonWithoutIndex

        public void setFullTextComparisonWithoutIndex​(boolean fullTextComparisonWithoutIndex)
      • isSql2Optimisation

        public boolean isSql2Optimisation()
      • setQueryValidatorPattern

        public void setQueryValidatorPattern​(String key,
                                             String pattern,
                                             String comment,
                                             boolean failQuery)
        Description copied from interface: QueryEngineSettingsMBean
        Set or remove a query validator pattern.
        Specified by:
        setQueryValidatorPattern in interface QueryEngineSettingsMBean
        Parameters:
        key - the key
        pattern - the regular expression pattern (empty to remove the pattern)
        comment - a comment
        failQuery - whether matching queries should fail (true) or just log a warning (false)
      • setIgnoredClassNamesInCallTrace

        public void setIgnoredClassNamesInCallTrace​(@NotNull
                                                    @NotNull String[] packageNames)
        Description copied from interface: QueryEngineSettingsMBean
        Set or remove java package/class names which are ignored from finding the invoking class for queries. It can be either Java package names or fully-qualified class names (package + class name).
        Specified by:
        setIgnoredClassNamesInCallTrace in interface QueryEngineSettingsMBean
        Parameters:
        packageNames - the class names to be ignored.