Table of Contents

Property Aggregations

Namespace
TantivyDotNet
Assembly
TantivyDotNet.dll

Aggregations

Aggregations to compute over all matching documents, as a JSON object in Tantivy's Elasticsearch-compatible format, or null for none. Results are in Aggregations. Aggregated fields must be fast fields.

public string? Aggregations { get; init; }

Property Value

string

Examples

Aggregations = """
    {"by_decade": {"histogram": {"field": "year", "interval": 10}},
     "avg_price": {"avg": {"field": "price"}}}
    """

Supported kinds include terms, range, histogram, date_histogram, avg, sum, min, max, stats, percentiles, cardinality and top_hits, with nested aggs; see Tantivy's aggregation documentation.

Exceptions

ArgumentException

The value isn't a JSON object.