The \help createIndex
and Official Docs are different.
I tried following the "shell manual" as it got me the farthest but I am still getting:
db.col.createIndex("name", {"fields": [{"field": "name", "type": "TEXT"}, {"field": "name2", "type": "TEXT"}]})
Invalid value for argument 'fields[0].field' (MySQL Error 5017)
My collection has both name and name2, and I believe this has nothing to do with it.
db.col.find()
[
{
"_id": "00005bcdb19f0000000000000001",
"a": [
1,
2
],
"name": "chen",
"name2": "chen"
}
]
1 document in set (0.0034 sec)
Any help would be appreciated