Since the reader is created from scratch, it is essential to {@linkplain it.unimi.dsi.mg4j.search.DocumentIterator#dispose() dispose} thereturned iterator after usage. See {@link IndexReader#documents(int)}for a method with the same semantics, but making reader reuse possible. @param term a term. @throws IOException if an exception occurred while accessing the index. @throws UnsupportedOperationException if this index is not accessible by termnumber. @see IndexReader#documents(int)
Note that the index iterator returned by this method will return null
on a call to {@link IndexIterator#term() term()}.
Note that it is always possible to call this method with argument 0, even if the underlying index does not provide random access. @param termNumber the number of a term. @throws UnsupportedOperationException if this index reader is not accessible by termnumber.
|
|
|
|