Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12173

when $text is in $or, it should be evalutate first

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.5
    • Affects Version/s: None
    • Component/s: Querying, Text Search
    • Labels:
      None
    • Fully Compatible

      I'm able to use $text expression in $or when I shouldn't be.

      db.articles.find({  $or: [   { $text: { $search: "bake" } },   { _id: 5 }   ] })
      

      returns

      { "_id" : 5, "subject" : "the cake that came out of the oven" }
      

      And like the ticket regarding $and and two text expression, I'm also allowed currently to do $or and two text expressions. But I figure one of these two tickets would make that situation moot.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: