Class IteratorSearchResponse

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<ArtifactInfo>

    public class IteratorSearchResponse
    extends AbstractSearchResponse
    implements java.lang.Iterable<ArtifactInfo>, java.io.Closeable
    A Search Response for the "iterator-like" search request. The totalHitsCount reports total hits found on index, even if the set of ArtifactInfos are usually limited! On the flipside, the hitsCount is actually unknown, since this instance performs filtering on the fly, hence it does not know how many hits it will return ahead of time.
    • Field Detail

      • EMPTY_ITERATOR_RESULT_SET

        public static final IteratorResultSet EMPTY_ITERATOR_RESULT_SET
      • TOO_MANY_HITS_ITERATOR_SEARCH_RESPONSE

        public static final IteratorSearchResponse TOO_MANY_HITS_ITERATOR_SEARCH_RESPONSE
        Deprecated.
        Left here for backward compatibility, but since version 4.1.0 (see MINDEXER-14) there is NO notion of "hit limit" anymore.
        Too many search response.
    • Constructor Detail

      • IteratorSearchResponse

        public IteratorSearchResponse​(org.apache.lucene.search.Query query,
                                      int totalHits,
                                      IteratorResultSet results)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Description copied from class: AbstractSearchResponse
        Frees any resource associated with this response. Should be called as last method on this response, when it's not used anymore.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class AbstractSearchResponse
        Throws:
        java.io.IOException
      • getTotalProcessedArtifactInfoCount

        public int getTotalProcessedArtifactInfoCount()
        A helper method delegating the call to the IteratorResultSet.
        Returns: