Class JsonSearchDefinition<TDocument>
A search definition based on a JSON string.
public sealed class JsonSearchDefinition<TDocument> : SearchDefinition<TDocument>
Type Parameters
TDocument
The type of the document.
- Inheritance
-
SearchDefinition<TDocument>JsonSearchDefinition<TDocument>
- Inherited Members
Constructors
JsonSearchDefinition(string)
Initializes a new instance of the JsonSearchDefinition<TDocument> class.
public JsonSearchDefinition(string json)
Parameters
json
stringThe JSON string specifying the search definition.
Properties
Json
Gets the JSON string.
public string Json { get; }
Property Value
Methods
Render(SearchDefinitionRenderContext<TDocument>)
Renders the search definition to a BsonDocument.
public override BsonDocument Render(SearchDefinitionRenderContext<TDocument> renderContext)
Parameters
renderContext
SearchDefinitionRenderContext<TDocument>The render context.