lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1601343 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/index/IndexReader.java
Date Mon, 09 Jun 2014 11:11:59 GMT
Author: mikemccand
Date: Mon Jun  9 11:11:58 2014
New Revision: 1601343

URL: http://svn.apache.org/r1601343
Log:
improve javadocs

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java?rev=1601343&r1=1601342&r2=1601343&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/index/IndexReader.java
Mon Jun  9 11:11:58 2014
@@ -34,9 +34,19 @@ import java.util.WeakHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 // javadocs
 
-/** IndexReader is an abstract class, providing an interface for accessing an
- index.  Search of an index is done entirely through this abstract interface,
- so that any subclass which implements it is searchable.
+/**
+ IndexReader is an abstract class, providing an interface for accessing a
+ point-in-time view of an index.  Any changes made to the index
+ via {@link IndexWriter} will not be visible until a new
+ {@code IndexReader} is opened.  It's best to use {@link
+ DirectoryReader#open(IndexWriter,boolean)} to obtain an
+ {@code IndexReader}, if your {@link IndexWriter} is
+ in-process.  When you need to re-open to see changes to the
+ index, it's best to use {@link DirectoryReader#openIfChanged(DirectoryReader)}
+ since the new reader will share resources with the previous
+ one when possible.  Search of an index is done entirely
+ through this abstract interface, so that any subclass which
+ implements it is searchable.
 
  <p>There are two different types of IndexReaders:
  <ul>



Mime
View raw message