public abstract class

DocIdSet

extends Object
java.lang.Object
   ↳ org.apache.lucene.search.DocIdSet
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

A DocIdSet contains a set of doc ids. Implementing classes must only implement iterator() to provide access to the set.

Summary

Fields
public static final DocIdSet EMPTY_DOCIDSET An empty DocIdSet instance for easy use, e.g.
Public Constructors
DocIdSet()
Public Methods
boolean isCacheable()
This method is a hint for CachingWrapperFilter, if this DocIdSet should be cached without copying it into a BitSet.
abstract DocIdSetIterator iterator()
Provides a DocIdSetIterator to access the set.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final DocIdSet EMPTY_DOCIDSET

An empty DocIdSet instance for easy use, e.g. in Filters that hit no documents.

Public Constructors

public DocIdSet ()

Public Methods

public boolean isCacheable ()

This method is a hint for CachingWrapperFilter, if this DocIdSet should be cached without copying it into a BitSet. The default is to return false. If you have an own DocIdSet implementation that does its iteration very effective and fast without doing disk I/O, override this method and return true.

public abstract DocIdSetIterator iterator ()

Provides a DocIdSetIterator to access the set. This implementation can return null or EMPTY_DOCIDSET.iterator() if there are no docs that match.

Throws
IOException