Interface QueryIndex.IndexPlan
-
- All Superinterfaces:
java.lang.Cloneable
- All Known Implementing Classes:
AggregateIndexPlan
- Enclosing interface:
- QueryIndex
@ProviderType public static interface QueryIndex.IndexPlan extends java.lang.CloneableAn index plan.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classQueryIndex.IndexPlan.BuilderA builder for index plans.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description QueryIndex.IndexPlancopy()Creates a cloned copy of current plan.default java.util.Map<java.lang.String,java.util.List<java.lang.String>>getAdditionalLogMessages()This method can be used for communicating any messages which should be logged if this plan is selected for execution.default java.util.Map<Level,java.util.List<java.lang.String>>getAdditionalMessages()Deprecated, for removal: This API element is subject to removal in a future version.usegetAdditionalLogMessages()instead@Nullable java.lang.ObjectgetAttribute(java.lang.String name)Returns the value of the named attribute as anObject, ornullif no attribute of the given name exists.doublegetCostPerEntry()The cost to read one entry from the cursor.doublegetCostPerExecution()The cost to execute the query once.NodeStategetDefinition()The node state with the index definition.longgetEstimatedEntryCount()The estimated number of entries in the cursor that is returned by the query method, when using this plan.FiltergetFilter()The filter to use.java.lang.StringgetPathPrefix()The path prefix for this index plan.@Nullable java.lang.StringgetPlanName()Get the unique plan name.@Nullable Filter.PropertyRestrictiongetPropertyRestriction()The property restriction for this index plan ornullif this index plan isn't base on a property restriction.java.util.List<QueryIndex.OrderEntry>getSortOrder()The sort order of the returned entries, or null if unsorted.booleangetSupportsPathRestriction()Whether index for this plan supports handling path restrictions natively.booleanincludesNodeData()Whether the cursor is able to read all properties from a node.booleanisDelayed()Whether the index is not always up-to-date.booleanisDeprecated()Whether the index is deprecated.booleanisFulltextIndex()Whether the fulltext part of the filter is evaluated (possibly with an extended syntax).default booleanlogWarningForPathFilterMismatch()voidsetFilter(Filter filter)Use the given filter.
-
-
-
Field Detail
-
LOG
static final Logger LOG
-
-
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 ornullif 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 anObject, ornullif no attribute of the given name exists.- Parameters:
name-Stringspecifying the name of the attribute- Returns:
- an
Objectcontaining the value of the attribute, ornullif 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
@Deprecated(forRemoval=true) default java.util.Map<Level,java.util.List<java.lang.String>> getAdditionalMessages()
Deprecated, for removal: This API element is subject to removal in a future version.usegetAdditionalLogMessages()insteadThis 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.
-
getAdditionalLogMessages
default java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAdditionalLogMessages()
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.
-
-