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

SearchMeta Facet without operator not supported by driver but is supported by api

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • None
    • 2.23.0, 2.23.1
    • None
    • None

    Description

      public FacetSearchDefinition(SearchDefinition<TDocument> @operator, IEnumerable<SearchFacet<TDocument>> facets)
      : base(OperatorType.Facet)
      {
      _operator = Ensure.IsNotNull(@operator, nameof(@operator));
      _facets = Ensure.IsNotNull(facets, nameof(facets)).ToArray();
      }

      according to docs the operator is not required (and testing with compass proves desired results)

      https://www.mongodb.com/docs/atlas/atlas-search/facet/#syntax

      perator document no Operator to use to perform the facet over. If omitted, Atlas Searchperforms the facet over all documents in the collection.

      My usecase: I just want a count of all documents per status so I can report on the statistics

      Attachments

        Activity

          People

            Unassigned Unassigned
            ben.gelens@security.wortell.nl Ben Gelens
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: