gregdillon
gregdillon

Reputation: 23

Creating a search with Sails.js and MongoDB

I'm wanting to create a search page in Sails.js that will search through a MongoDB. I know how to accomplish this. However, I was wondering if there is a way with Waterline, or any other option, to account for typos and alternate spellings. For example. If the MongoDB entry is "Springfield High School" how can I account for "Springfield High-School" or "Spring Field High School" etc... I'm assuming if this is possible it's done with Waterline some way, but I haven't been able to find any good documentation (findLike()???).

Upvotes: 1

Views: 998

Answers (1)

Bruce Lucas
Bruce Lucas

Reputation: 959

MongoDB supports full text search through text indexes, including search string tokenization and simple language-specific stemming. See the linked page for a full description of features.

Upvotes: 1

Related Questions