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

Compound textual index with nested fields does not return data

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • 3.4.14
    • None
    • Text Search
    • None
    • ALL
    • Hide

      Query:
      find({"grades.levels" : {$in : [1]}, $text: {$search: "123"}} )

      Data model:
      { "fileName" : "123", "grades" :

      { "levels" : [1, 2, 3] }

      }

      Non-working index: (not returning anything)

      { "fileName" : "text", "grades.levels" : 1}

      Working index:

      { "fileName" : "text", "grades" : 1}
      Show
      Query: find({"grades.levels" : {$in : [1] }, $text: {$search: "123"}} ) Data model: { "fileName" : "123", "grades" : { "levels" : [1, 2, 3] } } Non-working index: (not returning anything) { "fileName" : "text", "grades.levels" : 1} Working index: { "fileName" : "text", "grades" : 1}

    Description

      When I have a compound textual index with a nested field, my query does not return any expected data (not just not using the index)

      Attachments

        Issue Links

          Activity

            People

              kelsey.schubert@mongodb.com Kelsey T Schubert
              cchenSmarttech Cheng [X]
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: