Interface RangeIndexReader<T>
-
- Type Parameters:
T-
- All Superinterfaces:
AutoCloseable,Closeable
public interface RangeIndexReader<T> extends Closeable
Interface for indexed range queries
-
-
Method Summary
Modifier and Type Method Description TgetMatchingDocIds(double min, double max)Returns doc ids with a value between min and max, both inclusive.TgetMatchingDocIds(float min, float max)Returns doc ids with a value between min and max, both inclusive.TgetMatchingDocIds(int min, int max)Returns doc ids with a value between min and max, both inclusive.TgetMatchingDocIds(long min, long max)Returns doc ids with a value between min and max, both inclusive.intgetNumMatchingDocs(double min, double max)Returns the number of docs with a value between min and max, both inclusive.intgetNumMatchingDocs(float min, float max)Returns the number of docs with a value between min and max, both inclusive.intgetNumMatchingDocs(int min, int max)Returns the number of docs with a value between min and max, both inclusive.intgetNumMatchingDocs(long min, long max)Returns the number of docs with a value between min and max, both inclusive.TgetPartiallyMatchingDocIds(double min, double max)Returns doc ids with a value between min and max, both inclusive.TgetPartiallyMatchingDocIds(float min, float max)Returns doc ids with a value between min and max, both inclusive.TgetPartiallyMatchingDocIds(int min, int max)Returns doc ids with a value between min and max, both inclusive.TgetPartiallyMatchingDocIds(long min, long max)Returns doc ids with a value between min and max, both inclusive.default booleanisExact()
-
-
-
Method Detail
-
isExact
default boolean isExact()
- Returns:
- true if the results are exact and don't need refinement by scanning. This means {@see getPartiallyMatchingDocIds} will return null.
-
getNumMatchingDocs
int getNumMatchingDocs(int min, int max)Returns the number of docs with a value between min and max, both inclusive. Doc ids returned by this method must correspond to values which satisfy the query.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getNumMatchingDocs
int getNumMatchingDocs(long min, long max)Returns the number of docs with a value between min and max, both inclusive. The count is exact unless {@see getPartiallyMatchingDocIds} returns a non-null value.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getNumMatchingDocs
int getNumMatchingDocs(float min, float max)Returns the number of docs with a value between min and max, both inclusive. The count is exact unless {@see getPartiallyMatchingDocIds} returns a non-null value.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getNumMatchingDocs
int getNumMatchingDocs(double min, double max)Returns the number of docs with a value between min and max, both inclusive. The count is exact unless {@see getPartiallyMatchingDocIds} returns a non-null value.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getMatchingDocIds
@Nullable T getMatchingDocIds(int min, int max)
Returns doc ids with a value between min and max, both inclusive. Doc ids returned by this method must correspond to values which satisfy the query.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getMatchingDocIds
@Nullable T getMatchingDocIds(long min, long max)
Returns doc ids with a value between min and max, both inclusive. Doc ids returned by this method must correspond to values which satisfy the query.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getMatchingDocIds
@Nullable T getMatchingDocIds(float min, float max)
Returns doc ids with a value between min and max, both inclusive. Doc ids returned by this method must correspond to values which satisfy the query.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getMatchingDocIds
@Nullable T getMatchingDocIds(double min, double max)
Returns doc ids with a value between min and max, both inclusive. Doc ids returned by this method must correspond to values which satisfy the query.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getPartiallyMatchingDocIds
@Nullable T getPartiallyMatchingDocIds(int min, int max)
Returns doc ids with a value between min and max, both inclusive. Doc ids returned by this method may correspond to values which satisfy the query, and require post filtering. If the implementation supports exact matches, this method will return null.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getPartiallyMatchingDocIds
@Nullable T getPartiallyMatchingDocIds(long min, long max)
Returns doc ids with a value between min and max, both inclusive. Doc ids returned by this method may correspond to values which satisfy the query, and require post filtering. If the implementation supports exact matches, this method will return null.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getPartiallyMatchingDocIds
@Nullable T getPartiallyMatchingDocIds(float min, float max)
Returns doc ids with a value between min and max, both inclusive. Doc ids returned by this method may correspond to values which satisfy the query, and require post filtering. If the implementation supports exact matches, this method will return null.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
getPartiallyMatchingDocIds
@Nullable T getPartiallyMatchingDocIds(double min, double max)
Returns doc ids with a value between min and max, both inclusive. Doc ids returned by this method may correspond to values which satisfy the query, and require post filtering. If the implementation supports exact matches, this method will return null.- Parameters:
min- the inclusive lower bound.max- the inclusive upper bound.- Returns:
- the matching doc ids.
-
-