IsCurrent() public method

Check whether any new changes have occurred to the index since this reader was opened.

If this reader is based on a Directory (ie, was created by calling Open(Store.Directory) , or Reopen() on a reader based on a Directory), then this method checks if any further commits (see IndexWriter.Commit() have occurred in that directory).

If instead this reader is a near real-time reader (ie, obtained by a call to IndexWriter.GetReader(), or by calling Reopen() on a near real-time reader), then this method checks if either a new commmit has occurred, or any new uncommitted changes have taken place via the writer. Note that even if the writer has only performed merging, this method will still return false.

In any event, if this returns false, you should call Reopen() to get a new reader that sees the changes.

public IsCurrent ( ) : bool
return bool
コード例 #1
0
 public override bool IsCurrent()
 {
     return(in_Renamed.IsCurrent());
 }