KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am looking for a way to sort results by value of a field while performing a full text search with mongodb 2.4. My text search command looks something like this: db.books.runCommand( "text", { search: "science" } ) What I would like to do is something like: db.books.runCommand( "text", { search: "science", "sort": "rating" } ) I can see in the documentation that a limit parameter exists, but not something to sort results by other than the default sort by relevance score. Re sorting the results is probably going to be inefficient. What is a good way to get this done?
Tags (comma-separated)
Save Edits
Cancel