Method Term
- Namespace
- TantivyDotNet
- Assembly
- TantivyDotNet.dll
Term(string, string)
Matches documents whose field contains exactly value.
For a JSON field, field is a path such as attrs.color.
public static TermQuery Term(string field, string value)
Parameters
Returns
Remarks
The value is not analyzed: with the default tokenizer, text is indexed lowercased, so
Term("title", "Mice") matches nothing while Term("title", "mice") does. Use
Phrase(string, string, int) or Parse(string, QueryParserOptions) to have the text analyzed, or a string field
(AddStringField(string, bool, bool)) for exact identifiers.
Term(string, ulong)
Matches documents whose field contains exactly value.
For a JSON field, field is a path such as attrs.color.
public static TermQuery Term(string field, ulong value)
Parameters
Returns
Term(string, long)
Matches documents whose field contains exactly value.
Also works on u64 fields (for non-negative values) and f64 fields.
public static TermQuery Term(string field, long value)
Parameters
Returns
Term(string, double)
Matches documents whose field contains exactly value.
For a JSON field, field is a path such as attrs.color.
public static TermQuery Term(string field, double value)
Parameters
Returns
Term(string, bool)
Matches documents whose field contains exactly value.
For a JSON field, field is a path such as attrs.color.
public static TermQuery Term(string field, bool value)
Parameters
Returns
Term(string, DateTimeOffset)
Matches documents whose date field equals value, at the
index's date precision (seconds by default).
public static TermQuery Term(string field, DateTimeOffset value)
Parameters
fieldstringvalueDateTimeOffset
Returns
Term(string, DateTime)
Matches documents whose date field equals value, at the
index's date precision (seconds by default).
public static TermQuery Term(string field, DateTime value)
Parameters
Returns
Remarks
A Unspecified value is treated as UTC.
Term(string, ReadOnlySpan<byte>)
Matches documents whose field contains exactly value.
For a JSON field, field is a path such as attrs.color.
public static TermQuery Term(string field, ReadOnlySpan<byte> value)
Parameters
fieldstringvalueReadOnlySpan<byte>
Returns
Term(string, IPAddress)
Matches documents whose IP address field equals value (IPv4 also matches its IPv4-mapped IPv6 form).
public static TermQuery Term(string field, IPAddress value)