Support MongoDB text search

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 5.1.0, origin-2.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Text search has been made official as of version 2.6 of mongodb and it appears that it's almost possible to use it by building a Criteria as follows:
      Model.where(
      :$text => {:$search => "search string", :$language => "en"}
      )

      However the ruby driver is lacking an api to set the $meta flag on projection field (second argument of db.collection.find(...)), which required to sort by the search score.

      http://docs.mongodb.org/manual/reference/operator/query/text/
      http://docs.mongodb.org/manual/reference/operator/projection/meta/

      It's also hard to say if the Criteria sort method will work properly without being able to test passing along the projection argument.

              Assignee:
              Emily Stolfo (Inactive)
              Reporter:
              sbelous
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: