Facet field

Feature

Create a nested facet

How to

  1. Configure facet (field, range, query or spatial)
    DocumentCollection<TechProductDocument> documentCollection; // from DI

    var rersult = documentCollection
        .Select()
        .FacetField(q => q.InStock)
        .Execute();
  1. Configure nested facet (field, range, query or spatial)
    DocumentCollection<TechProductDocument> documentCollection; // from DI

    var rersult = documentCollection
        .Select()
        .FacetField(q => q.InStock, facet => facet
            .FacetField(q => q.Categories))
        .Execute()
        .Facets(out var data);
  1. Follow instructions to read data of a facet field, range, query or spatial