Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1156

CountDocuments doesn't work with a hint

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • 1.0.1
    • CRUD
    • None
    •   mongodb v4.0.6
      driver v1.0.1
      OS: Ubuntu 18.04
      Go: 1.12

    Description

      I am trying to run CountDocuments with a hint but it isn't working. It returns an error `unrecognized field hint`

       

      This is my code

       

      ```
      opts := &options.CountOptions{}
              opts.SetHint("formId_1_client_1_isActive_1__p_createdBy_1__created_at_1")
              count, err := r.collection.CountDocuments(ctx, query, opts)
              if err != nil {
                  return 0, err
              }
              return count, nil
      ```

      Attachments

        Activity

          People

            manny.eppinger@mongodb.com Emmanuel Eppinger (Inactive)
            palash25 Palash Nigam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: