How to implement keyword and location search with MongoDB?
NickName:Matt W Ask DateTime:2011-07-18T23:46:56

How to implement keyword and location search with MongoDB?

I am trying to implement a web/smart phone app that allow users to search for places based on keywords and location and here is the requirement:

  • Users shall be able to search by typing in keywords and location; Locations can be zip code, city/state or current location from the mobile app (lat and long)
  • We would like to be able to customize relevance score; We need to be able to define our own relevance algorithm based on keyword matching, location matching and some other parameters.

We use ASP.NET MVC as our web development framework and MongoDB as a data store. We also maintain a list of all zipcode and city/state as well as their centroid (lat/long) in our database. Our thought is override the scoring that the full-text system provide (like Lucene scoring) with our own algorithm. I am trying to find the best solution to address this. I am wondering whether should we use MongoDB full-text search or try to use Lucene .NET or perhaps Solr? Any help/pointer/comment is always apprecated!

Copyright Notice:Content Author:「Matt W」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/6735596/how-to-implement-keyword-and-location-search-with-mongodb

More about “How to implement keyword and location search with MongoDB?” related questions

How to implement keyword and location search with MongoDB?

I am trying to implement a web/smart phone app that allow users to search for places based on keywords and location and here is the requirement: Users shall be able to search by typing in keywords...

Show Detail

How to search on mongodb mongoose ObjectId per keyword?

How to search on mongodb mongoose _id ObjectId per keyword? Example in mysql SELECT * FROM `table` WHERE `id` LIKE '%keyword%' How can i achieve that in mongodb?

Show Detail

How to implement a Keyword Search in MySQL?

I am new to SQL programming. I have a table job where the fields are id, position, category, location, salary range, description, refno. I want to implement a keyword search from the front end. The

Show Detail

How to implement a Keyword Search in MySQL?

I am new to SQL programming. I have a table job where the fields are id, position, category, location, salary range, description, refno. I want to implement a keyword search from the front end. The

Show Detail

Text search in MongoDB, keyword search

I'm trying to do a keyword search in my mongoDB database. In the mongoDB console: db.logs.find({$text: {$search: 'key1'}}) gives the correct result. But when I use mongoose-text-search on my nodejs

Show Detail

how to implement keyword search in CouchDB

I am new to CouchDB. How to implement keyword search in CouchDB? For example, I have users document in CouchDB. The structure is the following: UsersCouchDB: id: 1 last_name: jack first_name: abc

Show Detail

How implement location search (and item search by location)?

I need to implement location search and search by location (the best examples are booking.com, or airbnb) In a nutshell: users can create some items related to cities (like hotels in a city), so...

Show Detail

Elastic Search With MongoDb

I am very new to Elastic Search so i have gone thorugh many articles and blog to implement elastic search in java with mongodb but can not find a satisfactory answer. scenario : I have a DB of mong...

Show Detail

How do I search for a phrase and a keyword at the same time in mongodb?

Basically I'm going through a large yelp database in my mongodb, and I want to find all reviews with the phrase hot wings and keyword discount. But I can't create the right query that will look for...

Show Detail

How can I implement a search service which uses proximity to a location as a ranking parameter

I have a data set over which I need to implement a location based search service. I will filter the data initially based on keyword arguments and then I need to sort them based on proximity to the ...

Show Detail