Table of Contents

Method Count

Namespace
TantivyDotNet
Assembly
TantivyDotNet.dll

Count(string, IEnumerable<string>?)

Counts the documents matching query without retrieving them.

public long Count(string query, IEnumerable<string>? defaultFields = null)

Parameters

query string

For example body:mice AND year:[1930 TO 1940], "exact phrase", title:rust -java. Terms without a field: prefix search defaultFields. Terms are combined with OR by default.

defaultFields IEnumerable<string>

Returns

long

Count(Query)

Counts the documents matching query without retrieving them.

public long Count(Query query)

Parameters

query Query

The query; see Query.

Returns

long