Atlas Search Error: Fuzzy Match Fails when used with Multi-Analyzer in embeddedDocument Operator

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Text Search
    • None
    • Query Integration
    • ALL
    • Hide

      Issue is reproduced with this playground

      https://search-playground.mongodb.com/tools/code-sandbox/snapshots/6822363ad0667e68f2234828

      Contents of playground are detailed below.

      Index

      {
        "mappings": {
          "dynamic": false,
          "fields":{
            "aliases": {
              "dynamic": false,
              "fields": {
                "firstName": {
                  "multi": {
                    "arabicAnalyzer": {
                      "analyzer": "lucene.arabic",
                      "type": "string",
                      "store": false
                    }
                  },
                  "type": "string"
                },
                "lastName": {
                  "analyzer": "lucene.standard",
                  "multi": {
                    "arabicAnalyzer": {
                      "analyzer": "lucene.arabic",
                      "type": "string"
                    }
                  },
                  "type": "string"
                },
                "middleName": {
                  "analyzer": "lucene.standard",
                  "multi": {
                    "arabicAnalyzer": {
                      "analyzer": "lucene.arabic",
                      "type": "string"
                    }
                  },
                  "type": "string"
                }
              },
              "type": "embeddedDocuments"
            }
          }
        }
      }
      

      Query

      [
        {
          $search: {
            index: "default",
            embeddedDocument: {
              path: "aliases",
              operator: {
                compound: {
                  should: [
                    {
                      text: {
                        query: "test",
                        fuzzy: { maxEdits: 2 }, // <---- comment this out to enable 
                        path: {
                          value: "aliases.firstName",
                          multi: "arabicAnalyzer"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      ]
      
      
      Show
      Issue is reproduced with this playground https://search-playground.mongodb.com/tools/code-sandbox/snapshots/6822363ad0667e68f2234828 Contents of playground are detailed below. Index { "mappings": { "dynamic": false, "fields":{ "aliases": { "dynamic": false, "fields": { "firstName": { "multi": { "arabicAnalyzer": { "analyzer": "lucene.arabic", "type": "string", "store": false } }, "type": "string" }, "lastName": { "analyzer": "lucene.standard", "multi": { "arabicAnalyzer": { "analyzer": "lucene.arabic", "type": "string" } }, "type": "string" }, "middleName": { "analyzer": "lucene.standard", "multi": { "arabicAnalyzer": { "analyzer": "lucene.arabic", "type": "string" } }, "type": "string" } }, "type": "embeddedDocuments" } } } } Query [ { $search: { index: "default", embeddedDocument: { path: "aliases", operator: { compound: { should: [ { text: { query: "test", fuzzy: { maxEdits: 2 }, // <---- comment this out to enable path: { value: "aliases.firstName", multi: "arabicAnalyzer" } } } ] } } } } } ]
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      When using fuzzy matching in an Atlas Search query with a multi-analyzer inside an embeddedDocument operator, the query fails with the error:

      aliases.firstName (multi: themisAnalyzer) not found in index: mongodb-individual-profile-index
      

       
      The error disappears when the fuzzy object is removed

            Assignee:
            Unassigned
            Reporter:
            Tayo Fajana
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: