Marcelo Eden
Marcelo Eden

Reputation: 351

How to do full text search in mongoosejs?

What is the easier way to do a full text search with mongoose?

Upvotes: 0

Views: 2600

Answers (4)

Rosseyn
Rosseyn

Reputation: 72

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

Upvotes: 0

ChewOnThis_Trident
ChewOnThis_Trident

Reputation: 2259

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

Upvotes: 0

aaronheckmann
aaronheckmann

Reputation: 10780

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.

Upvotes: 1

Gates VP
Gates VP

Reputation: 45287

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.

Upvotes: 2

Related Questions