lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonghui Zhao <zhaoyong...@gmail.com>
Subject getNumericDocValues
Date Mon, 29 Jul 2013 14:56:29 GMT
In luncene 4.3 AtomicReader  has this interface

  public abstract NumericDocValues getNumericDocValues(String field)
throwsIOException

If I get a NumericDocValues of one field from a reader.

NumericDocValues has  get interface.

/**

   * Returns the numeric value for the specified document ID.

   * @param docID document ID to lookup

   * @return numeric value

   */

  public abstract long get(int docID);

I want to know what will be returned if  the input docID is not a valid id,
for examples:

1. the docID beyonds the reader scope

2. the doc with this docID is already deleted

2. the doc with this docID doesn't has the field

In one word, how can I check if the return value is valid.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message