Table of Contents

Class SearchFacet<TDocument>

Namespace
MongoDB.Driver.Search
Assembly
MongoDB.Driver.dll

Base class for search facets.

public abstract class SearchFacet<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
SearchFacet<TDocument>
Inherited Members

Constructors

SearchFacet(string)

Initializes a new instance of the SearchFacet<TDocument> class.

protected SearchFacet(string name)

Parameters

name string

The name of the facet.

Properties

Name

Gets the name of the facet.

public string Name { get; }

Property Value

string

Methods

Render(SearchDefinitionRenderContext<TDocument>)

Renders the search facet to a BsonDocument.

public abstract BsonDocument Render(SearchDefinitionRenderContext<TDocument> renderContext)

Parameters

renderContext SearchDefinitionRenderContext<TDocument>

The render context.

Returns

BsonDocument

A BsonDocument.