Class GroupSelector<T>

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GroupSelector.State
      What to do with the current value
    • Constructor Summary

      Constructors 
      Constructor Description
      GroupSelector()  
    • Constructor Detail

      • GroupSelector

        public GroupSelector()
    • Method Detail

      • setNextReader

        public abstract void setNextReader​(LeafReaderContext readerContext)
                                    throws java.io.IOException
        Set the LeafReaderContext
        Throws:
        java.io.IOException
      • setScorer

        public abstract void setScorer​(Scorable scorer)
                                throws java.io.IOException
        Set the current Scorer
        Throws:
        java.io.IOException
      • advanceTo

        public abstract GroupSelector.State advanceTo​(int doc)
                                               throws java.io.IOException
        Advance the GroupSelector's iterator to the given document
        Throws:
        java.io.IOException
      • currentValue

        public abstract T currentValue()
                                throws java.io.IOException
        Get the group value of the current document

        N.B. this object may be reused, for a persistent version use copyValue()

        Throws:
        java.io.IOException
      • copyValue

        public abstract T copyValue()
                             throws java.io.IOException
        Returns:
        a copy of the group value of the current document
        Throws:
        java.io.IOException
      • setGroups

        public abstract void setGroups​(java.util.Collection<SearchGroup<T>> groups)
        Set a restriction on the group values returned by this selector

        If the selector is positioned on a document whose group value is not contained within this set, then advanceTo(int) will return GroupSelector.State.SKIP

        Parameters:
        groups - a set of SearchGroup objects to limit selections to