Interface QueryIndex.IndexPlan

  • All Superinterfaces:
    java.lang.Cloneable
    Enclosing interface:
    QueryIndex

    @ProviderType
    public static interface QueryIndex.IndexPlan
    extends java.lang.Cloneable
    An index plan.
    • Method Detail

      • getCostPerExecution

        double getCostPerExecution()
        The cost to execute the query once. The returned value should approximately match the number of disk read operations plus the number of network roundtrips (worst case).
        Returns:
        the cost per execution, in estimated number of I/O operations
      • getCostPerEntry

        double getCostPerEntry()
        The cost to read one entry from the cursor. The returned value should approximately match the number of disk read operations plus the number of network roundtrips (worst case).
        Returns:
        the lookup cost per entry, in estimated number of I/O operations
      • getEstimatedEntryCount

        long getEstimatedEntryCount()
        The estimated number of entries in the cursor that is returned by the query method, when using this plan. This value does not have to be accurate.
        Returns:
        the estimated number of entries
      • getFilter

        Filter getFilter()
        The filter to use.
        Returns:
        the filter
      • setFilter

        void setFilter​(Filter filter)
        Use the given filter.
      • isDelayed

        boolean isDelayed()
        Whether the index is not always up-to-date.
        Returns:
        whether the index might be updated asynchronously
      • isFulltextIndex

        boolean isFulltextIndex()
        Whether the fulltext part of the filter is evaluated (possibly with an extended syntax). If set, the fulltext part of the filter is not evaluated any more within the query engine.
        Returns:
        whether the index supports full-text extraction
      • includesNodeData

        boolean includesNodeData()
        Whether the cursor is able to read all properties from a node. If yes, then the query engine will not have to read the data itself.
        Returns:
        whether node data is returned
      • getSortOrder

        java.util.List<QueryIndex.OrderEntry> getSortOrder()
        The sort order of the returned entries, or null if unsorted.
        Returns:
        the sort order
      • getDefinition

        NodeState getDefinition()
        The node state with the index definition.
        Returns:
        the node state with the index definition.
      • getPathPrefix

        java.lang.String getPathPrefix()
        The path prefix for this index plan.
      • getSupportsPathRestriction

        boolean getSupportsPathRestriction()
        Whether index for this plan supports handling path restrictions natively.
      • getPropertyRestriction

        @Nullable
        @Nullable Filter.PropertyRestriction getPropertyRestriction()
        The property restriction for this index plan or null if this index plan isn't base on a property restriction. E.g. a plan based on an order by clause in the query.
        Returns:
        the restriction this plan is based on or null.
      • copy

        QueryIndex.IndexPlan copy()
        Creates a cloned copy of current plan. Mostly used when the filter needs to be modified for a given call
        Returns:
        clone of current plan
      • getAttribute

        @Nullable
        @Nullable java.lang.Object getAttribute​(java.lang.String name)
        Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.
        Parameters:
        name - String specifying the name of the attribute
        Returns:
        an Object containing the value of the attribute, or null if the attribute does not exist
      • getPlanName

        @Nullable
        @Nullable java.lang.String getPlanName()
        Get the unique plan name.
        Returns:
        the plan name
      • isDeprecated

        boolean isDeprecated()
        Whether the index is deprecated.
        Returns:
        if it is deprecated
      • logWarningForPathFilterMismatch

        default boolean logWarningForPathFilterMismatch()
      • getAdditionalMessages

        default java.util.Map<Level,​java.util.List<java.lang.String>> getAdditionalMessages()
        This method can be used for communicating any messages which should be logged if this plan is selected for execution. The messages are returned as a map whose key indicates log level and value is a list of messages against that log level.
        Returns:
        map containing log messages.