Table of Contents

Class SearchResults

Namespace
TantivyDotNet
Assembly
TantivyDotNet.dll

The hits returned by Search(Query, SearchOptions), best first.

public sealed class SearchResults : IReadOnlyList<SearchHit>, IReadOnlyCollection<SearchHit>, IEnumerable<SearchHit>, IEnumerable
Inheritance
SearchResults
Implements
Inherited Members

Properties

Aggregations

The results of Aggregations, keyed by the names used in the request (Tantivy's Elasticsearch-style result JSON), or null if none were requested.

Count

Number of hits returned (at most the requested limit).

Facets

Facet counts keyed by facet field, for the Facets requested: the children of each requested path, with the number of matching documents in each. Children with no matches are left out. Empty if no facets were requested.

this[int]

Gets the element at the specified index in the read-only list.

TotalCount

Total number of matching documents, which can exceed the number of hits returned.

Methods

GetAggregations<T>()

Deserializes Aggregations into T with reflection-based System.Text.Json. For trimmed or NativeAOT apps, use GetAggregations<T>(JsonTypeInfo<T>).

GetAggregations<T>(JsonTypeInfo<T>)

Deserializes Aggregations into T (AOT-safe).

GetEnumerator()

Returns an enumerator that iterates through the collection.