Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Full-text search with Meteor.js and MongoDB

Tags:

mongodb

meteor

I am experimenting with Meteor.js and looking for a full-text search engine that can run on Meteor/MongoDB server. It seems that Meteor has not developed this feature.

I wonder if there is an existing solution for adding full-text search to Meteor app.

The only thing I can find is MongoLantern, which has node.js API. How should I go about adding MongoLantern to my Meteor app?

like image 608
AdamNYC Avatar asked Jan 28 '13 17:01

AdamNYC


People also ask

Can MongoDB do full-text search?

MongoDB offers a full-text search solution, MongoDB Atlas Search, for data hosted on MongoDB Atlas.

How does MongoDB text search work?

MongoDB text search uses the Snowball stemming library to reduce words to an expected root form (or stem) based on common language rules. Algorithmic stemming provides a quick reduction, but languages have exceptions (such as irregular or contradicting verb conjugation patterns) that can affect accuracy.

How do I search for partial text in MongoDB?

In MongoDB, we can search the text by using the $text query operator and it is used to perform text searches on a collection with a text index. It provides text indexes to support text search queries on string content.

How does MongoDB search?

MongoDB uses multikey indexes to index the content stored in arrays. If you index a field that holds an array value, MongoDB creates separate index entries for every element of the array. These multikey indexes allow queries to select documents that contain arrays by matching on element or elements of the arrays.


1 Answers

MongoDB 2.4 will have a full text search in it. Guide can be found here.

If you are prepared to run the development releases you can download MongoDB 2.3 now - it contains text search.

Update: MongoDB 2.4 has been released. Text search is described as Beta.

The guide for text search is here and the mongod must be run like this

mongod --setParameter textSearchEnabled=true
like image 169
andy boot Avatar answered Sep 19 '22 11:09

andy boot