You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2011/01/18 20:35:37 UTC
svn commit: r1060545 -
/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java
Author: shaie
Date: Tue Jan 18 19:35:37 2011
New Revision: 1060545
URL: http://svn.apache.org/viewvc?rev=1060545&view=rev
Log:
LUCENE-2472: deprecate IW.getReader(int)
Modified:
lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java
Modified: lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java?rev=1060545&r1=1060544&r2=1060545&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/IndexWriter.java Tue Jan 18 19:35:37 2011
@@ -407,7 +407,15 @@ public class IndexWriter implements Clos
* memory. By setting this to a value > 1 you can reduce
* memory usage, at the expense of higher latency when
* loading a TermInfo. The default value is 1. Set this
- * to -1 to skip loading the terms index entirely. */
+ * to -1 to skip loading the terms index entirely.
+ *
+ * @deprecated this method cannot guarantee the reader (and its sub-readers)
+ * will be opened with the termInfosIndexDivisor setting because some of them
+ * may have already been opened according to
+ * {@link IndexWriterConfig#setReaderTermsIndexDivisor}. You should set the
+ * requested termInfosIndexDivisor through
+ * {@link IndexWriterConfig#setReaderTermsIndexDivisor} and use
+ * {@link #getReader()}. */
public IndexReader getReader(int termInfosIndexDivisor) throws IOException {
ensureOpen();