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

Comment on: "manual/core/index-text.txt"

    XMLWordPrintableJSON

Details

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

    Description

      I have reported an error previously here: https://jira.mongodb.org/browse/DOCS-3863

      Key kim close the ticket saying me this:

      Hi Claudio –
      thanks for taking the time to file this ticket with very clear examples.
      The text search matches on the complete stemmed words. For example, if a document field contains the word blueberry, a search on the term blue will not match the document.
      So, for your example, I believe the complete stemmed word for textt is textt and the stemmed search term for text is text and since the match is on the complete stemmed word, the two will not match.
      For more information, refer to http://docs.mongodb.org/manual/core/index-text/#text-search

      The things, Key Kim is wrong..

      In mongodb 2.6.3 you can search a word, for example, if you have the following documents:

      db.foo.find({});

      { "_id" : ObjectId("53dfd9453e1e4201402d2f5b"), "desc" : "This is a bug textt" } { "_id" : ObjectId("53dfd9453e1e4201402d2f5b"), "desc" : "Text" } { "_id" : ObjectId("53dfd9453e1e4201402d2f5b"), "desc" : "I wrote a text" } { "_id" : ObjectId("53dfd9453e1e4201402d2f5d"), "desc" : "This is a string with text" }

      and you have a "text" index for desc

      db.foo.ensureIndex(

      {"desc":"text"}

      );

      And you make this query finding text:

      db.foo.find({$text:{ $search:"text" }});

      You will get:

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

      Notice that the document:

      { "_id" : ObjectId("53dfd9453e1e4201402d2f5b"), "desc" : "This is a bug textt" }

      has not been received.

      I try this with the fallowing cases..

      I added many documents with this text string into a differents phrases..

      walk — walkk
      text ----- textt
      hello — helloo
      name – namee

      I thing the bug here is the double character in the end fo the key string or somelike that.

      I don't know for what reason Kim told me that this can't be done with mongo, I make all this querys on shell of mongo 2.6.3,

      Best
      C

      PD: For more details I found this ticket: https://jira.mongodb.org/browse/SERVER-380 where Jason Rassi says that the feature has been deployed in version of 2.6.3

      PD: And sorry for my english.

      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