Class SimpleSearchResultTotal
java.lang.Object
org.hibernate.search.engine.search.query.spi.SimpleSearchResultTotal
- All Implemented Interfaces:
SearchResultTotal
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleSearchResultTotal
exact
(long totalHitCount) long
hitCount()
long
boolean
boolean
static SimpleSearchResultTotal
lowerBound
(long totalHitCount) static SimpleSearchResultTotal
of
(long totalHitCount, boolean isExact) toString()
-
Method Details
-
of
-
exact
-
lowerBound
-
isHitCountExact
public boolean isHitCountExact()- Specified by:
isHitCountExact
in interfaceSearchResultTotal
- Returns:
- Whether the total hit count is exact.
The total hit count is exact by default, but that can change when a
SearchQueryOptionsStep.totalHitCountThreshold(long)
or aSearchQueryOptionsStep.truncateAfter(long, TimeUnit)
has been defined for the current query.
-
isHitCountLowerBound
public boolean isHitCountLowerBound()- Specified by:
isHitCountLowerBound
in interfaceSearchResultTotal
- Returns:
- Whether the total hit count is a lower-bound estimate.
The total hit count can be a lower bound only when a
SearchQueryOptionsStep.totalHitCountThreshold(long)
or aSearchQueryOptionsStep.truncateAfter(long, TimeUnit)
has been defined for the current query.
-
hitCount
public long hitCount()- Specified by:
hitCount
in interfaceSearchResultTotal
- Returns:
- The exact value of the total hit count, if available. Unless you used particular search options, you can safely assume the exact value of the total hit count is available.
-
hitCountLowerBound
public long hitCountLowerBound()- Specified by:
hitCountLowerBound
in interfaceSearchResultTotal
- Returns:
- A lower-bound estimate of the total hit count. If the total hit count is known exactly, the exact total hit count is returned.
-
toString
-