Class SimpleSearchResultTotal
java.lang.Object
org.hibernate.search.engine.search.query.spi.SimpleSearchResultTotal
- All Implemented Interfaces:
SearchResultTotal
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleSearchResultTotalexact(long totalHitCount) longhitCount()longbooleanbooleanstatic SimpleSearchResultTotallowerBound(long totalHitCount) static SimpleSearchResultTotalof(long totalHitCount, boolean isExact) toString()
-
Method Details
-
of
-
exact
-
lowerBound
-
isHitCountExact
public boolean isHitCountExact()- Specified by:
isHitCountExactin 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:
isHitCountLowerBoundin 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:
hitCountin 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:
hitCountLowerBoundin 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
-