Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8014

Export language feature from Compass has an issue for C#

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Export to Language
    • None
    • Environment:
      OS: Windows
      MongoDB.Driver: Version=2.25.0

      Problem Statement/Rationale

      What is going wrong? What action would you like the Engineering team to take?

      When creating an aggregation pipeline and having multiple text steps in the must and should collectors such as 


      compound: {
      must: [
            {
              text: {           query: "query",           path: "path",         }
            },
              text: {           query: "query",           path: "path",         }
            }]},
          should: [
            {
              text: {           query: "query",           path: "path",         },
              text: {           query: "query",           path: "path",         }

      ]}

      Please be sure to attach relevant logs with any sensitive data redacted.
      fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
            An unhandled exception has occurred while executing the request.
            System.InvalidOperationException: Duplicate element name 'text'.
               at MongoDB.Bson.BsonDocument.Add(BsonElement element)
               at MongoDB.Bson.BsonDocument.Add(String name, BsonValue value)

      Steps to Reproduce

      In Compass, create a search aggregation pipeline with multiple text operators for the must, filter and should collectors. Export it then to the C# language and try to run it, you should see the above exception

      Expected Results

      Expect the export language feature to work out of the box in C# like it does in Compass

      Actual Results

      Exception in console

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            Unassigned Unassigned
            Reporter:
            desguerra@genetec.com Daniel Esguerra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: