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
      T getMatchingDocIds​(double min, double max)
      Returns doc ids with a value between min and max, both inclusive.
      T getMatchingDocIds​(float min, float max)
      Returns doc ids with a value between min and max, both inclusive.
      T getMatchingDocIds​(int min, int max)
      Returns doc ids with a value between min and max, both inclusive.
      T getMatchingDocIds​(long min, long max)
      Returns doc ids with a value between min and max, both inclusive.
      int getNumMatchingDocs​(double min, double max)
      Returns the number of docs with a value between min and max, both inclusive.
      int getNumMatchingDocs​(float min, float max)
      Returns the number of docs with a value between min and max, both inclusive.
      int getNumMatchingDocs​(int min, int max)
      Returns the number of docs with a value between min and max, both inclusive.
      int getNumMatchingDocs​(long min, long max)
      Returns the number of docs with a value between min and max, both inclusive.
      T getPartiallyMatchingDocIds​(double min, double max)
      Returns doc ids with a value between min and max, both inclusive.
      T getPartiallyMatchingDocIds​(float min, float max)
      Returns doc ids with a value between min and max, both inclusive.
      T getPartiallyMatchingDocIds​(int min, int max)
      Returns doc ids with a value between min and max, both inclusive.
      T getPartiallyMatchingDocIds​(long min, long max)
      Returns doc ids with a value between min and max, both inclusive.
      default boolean isExact()  
    • 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.