Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3863

Comment on: "manual/reference/operator/query/text.txt"

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None

    Description

      I found a Bug on search query in mongodb:

      if you add a repeat character in the end of the stringg, the query not find the document.

      For example:

      db.foo.insert(

      {desc: "This is a string with text"}

      );
      db.foo.insert(

      {desc:"This is a string with textt"}

      );
      db.foo.ensureIndex(

      {"desc":"text"}

      );
      db.foo.find({
      $text:

      { $search:"text" }

      });

      The Result is:

      {
      "_id" : ObjectId("53dfd9453e1e4201402d2f5d"),
      "desc" : "This is a string with text"
      }

      And that query, should be:

      {
      "_id" : ObjectId("53dfd9453e1e4201402d2f5d"),
      "desc" : "This is a string with text"
      }
      {
      "_id" : ObjectId("53dfd9453e1e4201402d2f5e"),
      "desc" : "This is a string with textt"
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            cmarrero01@gmail.com Claudio Marrero
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 28 weeks, 2 days ago