TotalHits

data class TotalHits(val value: Long, val relation: TotalHits.Relation)

Description of the total number of hits of a query. The total hit count can't generally be computed accurately without visiting all matches, which is costly for queries that match lots of documents. Given that it is often enough to have a lower bounds of the number of hits, such as "there are more than 1000 hits", Lucene has options to stop counting as soon as a threshold has been reached in order to improve query times.

Parameters

value

The value of the total hit count. Must be interpreted in the context of .relation.

relation

Whether .value is the exact hit count, in which case .relation is equal to Relation.EQUAL_TO, or a lower bound of the total hit count, in which case .relation is equal to Relation.GREATER_THAN_OR_EQUAL_TO.

Constructors

Link copied to clipboard
constructor(value: Long, relation: TotalHits.Relation)

Types

Link copied to clipboard

How the TotalHits.value should be interpreted.

Properties

Link copied to clipboard
Link copied to clipboard
val value: Long

Functions

Link copied to clipboard
open override fun toString(): String