Class SimpleSearchResultTotal
- java.lang.Object
-
- org.hibernate.search.engine.search.query.spi.SimpleSearchResultTotal
-
- All Implemented Interfaces:
SearchResultTotal
public class SimpleSearchResultTotal extends Object implements SearchResultTotal
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleSearchResultTotalexact(long totalHitCount)longhitCount()longhitCountLowerBound()booleanisHitCountExact()booleanisHitCountLowerBound()static SimpleSearchResultTotallowerBound(long totalHitCount)static SimpleSearchResultTotalof(long totalHitCount, boolean isExact)StringtoString()
-
-
-
Method Detail
-
of
public static SimpleSearchResultTotal of(long totalHitCount, boolean isExact)
-
exact
public static SimpleSearchResultTotal exact(long totalHitCount)
-
lowerBound
public static SimpleSearchResultTotal lowerBound(long totalHitCount)
-
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.
-
-