开发者

How to do full text search in mongoosejs?

What is the easier way to do a full text sea开发者_Python百科rch with mongoose?


Mongoose is an "ORM" for MongoDB. MongoDB has some docs on full text search. However, MongoDB is not designed to be used for FTS, and big deployments typically use other tools like Solr or Sphinx.

If you're just trying to query with a regex, MongoDB supports that. The syntax should be similar in Mongoose.


MongoDB 2.4 contains experimental full text search capabilities: http://docs.mongodb.org/manual/release-notes/2.4/#text-indexes

There are a few mongoose keyword plugins for smaller scale stuff as well as an elasticsearch plugin. http://plugins.mongoosejs.com is a great place to discover more.


You might want to check out elastic search and mongoosastic. Take a look

http://www.elasticsearch.org/

https://github.com/jamescarr/mongoosastic

Hope this helps


Semi-recent developments for those who come looking, both MongoDB and Mongoose allow for text searches now:

What's new in Mongoose 3.8.9

Example usage of text search

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜