-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.10
-
Component/s: Text Search
-
Query Integration
-
(copied to CRM)
Most indexes have the indexed fields in the key document. Explain against these indexes will list the relevant fields in the keyPattern document. These fields can be used to help diagnose long-running queries.
"inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "b" : 1 }, "indexName" : "b_1",
Instead of the indexed fields themselves, text indexes use "_fts" : "text" and _ftsx" : 1 in the key document. Thus, when running explain against these queries, it is impossible to tell what fields are in the index unless the default indexName is used.
"inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "_fts" : "text", "_ftsx" : 1 }, "indexName" : "testName",
As the indexed fields will be represented in the weights document, adding the document to the explain output should accomplish the same effect as standard indexes.