Got it, thank you very much. 在 2013-7-29 下午11:34,"Adrien Grand" <jpou...@gmail.com>写道:
> Hi, > > On Mon, Jul 29, 2013 at 4:56 PM, Yonghui Zhao <zhaoyong...@gmail.com> > wrote: > > 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 > > In that case, the behavior is not defined, it might throw an exception > or return a random value. You should make sure you always call this > method with a valid document ID. > > > 2. the doc with this docID is already deleted > > It will return the same value it returned prior to the document > deletion. However, you shouldn't rely on this. > > > 2. the doc with this docID doesn't has the field > > In that case, the behavior is defined: it will return 0. > > Numeric doc values expect are dense: all documents have a value. When > a document doesn't have a value, 0 will be assigned by default at > indexing time. > > -- > Adrien > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >