Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2336

Can not create non-unique compound index

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical - P2 Critical - P2
    • None
    • 2.6.0
    • API
    • None
    • .net core 2.1

    Description

      var createIndexOptions = new CreateIndexOptions { Unique = false };
      this.OrderDocumentCollection.Indexes.CreateOne(
          Builders<OrdersDocument>.IndexKeys.Ascending(an => an.UserId).Ascending(an => an.CompanyId),
          createIndexOptions);
      

      Does not create compound index instead index only for  UserId is created 

       

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            Nikitos_1991 Nikita Vasiluk [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: