-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Critical - P2
-
Affects Version/s: 2.6.12, 3.0.15, 3.2.16, 3.4.9, 3.5.13
-
Component/s: Text Search
-
None
-
Environment:Linux CentOS 6.x
-
Fully Compatible
-
ALL
-
v3.4, v3.2, v3.0
-
Query 2017-10-02
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When creating a compound text index with a non-text prefix (containing nested keys), the index creates successfully. However, when issuing a find against the index using all fields, the mongod process terminates with the error message:
[conn5704] Invariant failure amExpr->numChildren() >= prefixEnd src/mongo/db/query/planner_access.cpp 466
Example Document:
{
"_id" : ObjectId("59bc4bdd77c83ac81ca5b784"),
"senderOildexId" : {
"companyId" : 22375,
"businessUnit" : 0
},
"receiverOildexId" : {
"companyId" : 0025,
"businessUnit" : 0
},
"propertyNumber" : "123456789",
"propertyName" : "J L BOND 12345",
"checksum" : "74c65685e49ffd7ef479961b237f73e1"
}
Index Created:
db.SenderProperties.createIndex( {
"senderOildexId.companyId": 1,
"senderOildexId.businessUnit": 1,
"receiverOildexId.companyId": 1,
"receiverOildexId.businessUnit" : 1,
propertyNumber: "text",
properyName: "text"
}, {
default_language: "none",
name: "test"
} )
Find query attempted:
db.SenderProperties.find({"senderOildexId.companyId": 22375, "senderOildexId.businessUnit" : 0, "receiverOildexId.companyId": 0025, "receiverOildexId.businessUnit" : 0, "$text" : {"$search": "J L BOND"}})
Full index build and error log: (see attachment)