MongoDB TextScore

  laravel, mongodb, search

I m new to MongoDB, for me I need to search the name " Raja Sekar " from name field in the database,

I have indexed it. But my condition is search term should match 75 percent of similar records.

Can you please help me with this

db.customers.find({$text: {$search: "raja sekar kumar"}}, {score: {$meta: "textScore"}}).sort({score:{$meta:"textScore"}})

Source: Laravel

Leave a Reply