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

Compound textual index with nested fields does not return data

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.4.14
    • Component/s: 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}

      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)

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

              Created:
              Updated:
              Resolved: