-
Type:
Question
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.6.0, 3.6.1, 3.6.2
-
Component/s: Index Maintenance
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Hi,
why can't text indexes not contain an array anymore?
Document:
> db.employee.findOne()
{
"allUnitIds" : [
"054edeaf-5efd-43b8-abe2-04164d9071a5"
],
"allSearchableStrings" : "..."
}
Indexcreation
> db.employee.createIndex({ "allSearchableStrings" : "text" , "allUnitIds" : 1})
{
"ok" : 0,
"errmsg" : "Field 'allUnitIds' of text index contains an array in document: { _id: \"2d937bbf-8a4f-4688-8821-a951971ba5e6\", allUnitIds: [ \"054edeaf-5efd-43b8-abe2-04164d9071a5\" ], allSearchableStrings: \"...\" }",
"code" : 201,
"codeName" : "CannotBuildIndexKeys"
}
It was at least possible with 3.4.x
- related to
-
SERVER-27392 text index with multi-key prefix is not rejected
-
- Closed
-