how to solve - “too many text index for ..” - mongodb error?

前提是你 提交于 2020-01-02 14:33:16

问题


Getting this error and don't know why, here is the snippet of the function that deals with mongodb full-text search:

...
db.collection.ensureIndex({ description: 'text' }, { name: 'TextIndex' });

db.collection.runCommand('text', { search: 'my query' }, function (err, res) {
   console.log(res); 
  // { 
  //   "message": "failed to search items for user by query", 
  //   "error": "too many text index for: .. 
  // }
});

The same problem appears in mongo shell as well..

来源:https://stackoverflow.com/questions/18385853/how-to-solve-too-many-text-index-for-mongodb-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!