summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/planner_ixselect.h
diff options
context:
space:
mode:
authorBernard Gorman <bernard.gorman@gmail.com>2018-09-06 16:30:44 +0100
committerBernard Gorman <bernard.gorman@gmail.com>2018-09-14 21:06:17 +0100
commitf8c5f009ac1def37d73b20d45dd9352e36849cb9 (patch)
treeea087702639c07b14676d5576db8189eed009a95 /src/mongo/db/query/planner_ixselect.h
parent45fccee20b37579662fabc6268a76a52f00661c4 (diff)
downloadmongo-f8c5f009ac1def37d73b20d45dd9352e36849cb9.tar.gz
SERVER-36362 Do not consider an 'allPaths' index for a $text query
Diffstat (limited to 'src/mongo/db/query/planner_ixselect.h')
-rw-r--r--src/mongo/db/query/planner_ixselect.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/query/planner_ixselect.h b/src/mongo/db/query/planner_ixselect.h
index b1834a1610e..b0181fab150 100644
--- a/src/mongo/db/query/planner_ixselect.h
+++ b/src/mongo/db/query/planner_ixselect.h
@@ -228,6 +228,17 @@ private:
const std::vector<IndexEntry>& indices);
/**
+ * This function strips RelevantTag assignments to expanded 'allPaths' indexes, in cases where
+ * the assignment is incompatible with the query.
+ *
+ * Specifically, if the query has a TEXT node with both 'text' and 'allPaths' indexes present,
+ * then the 'allPaths' index will mark itself as relevant to the '_fts' path reported by the
+ * TEXT node. We therefore remove any such misassigned 'allPaths' tags here.
+ */
+ static void stripInvalidAssignmentsToAllPathsIndexes(MatchExpression* root,
+ const std::vector<IndexEntry>& indices);
+
+ /**
* This function strips RelevantTag assignments to partial indices, where the assignment is
* incompatible with the index's filter expression.
*