Apache Lucene open-source search software
LUCENE-3606: javadocs
Robert Muir1ae93d369701
diff --git a/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java b/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.javaindex 2f61b5ba3c5..c356dea3336 100644--- a/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java+++ b/lucene/contrib/misc/src/java/org/apache/lucene/index/MultiPassIndexSplitter.java@@ -49,7 +49,7 @@ public class MultiPassIndexSplitter {/*** Split source index into multiple parts.- * @param input source index, can be read-only, can have deletions, can have+ * @param in source index, can have deletions, can have* multiple segments (or multiple readers).* @param outputs list of directories where the output parts will be stored.* @param seq if true, then the source index will be split into equaldiff --git a/lucene/src/java/org/apache/lucene/index/IndexReader.java b/lucene/src/java/org/apache/lucene/index/IndexReader.javaindex 875bbaebb3e..cc750e1a0ed 100644--- a/lucene/src/java/org/apache/lucene/index/IndexReader.java+++ b/lucene/src/java/org/apache/lucene/index/IndexReader.java@@ -31,7 +31,6 @@ import org.apache.lucene.document.DocumentStoredFieldVisitor;import org.apache.lucene.index.codecs.PerDocValues;import org.apache.lucene.index.values.IndexDocValues;import org.apache.lucene.search.FieldCache; // javadocs-import org.apache.lucene.search.similarities.Similarity;import org.apache.lucene.store.*;import org.apache.lucene.util.ArrayUtil;import org.apache.lucene.util.Bits;@@ -44,7 +43,7 @@ import org.apache.lucene.util.ReaderUtil; // for javadocs<p> Concrete subclasses of IndexReader are usually constructed with a call toone of the static <code>open()</code> methods, e.g. {@link- #open(Directory, boolean)}.+ #open(Directory)}.<p> For efficiency, in this API documents are often referred to via<i>document numbers</i>, non-negative integers which each name a unique@@ -62,13 +61,6 @@ import org.apache.lucene.util.ReaderUtil; // for javadocs<p>- <b>NOTE</b>: as of 2.4, it's possible to open a read-only- IndexReader using the static open methods that accept the- boolean readOnly parameter. Such a reader may have better- concurrency. You must specify false if you want to- make changes with the resulting IndexReader.- </p>-<a name="thread-safety"></a><p><b>NOTE</b>: {@linkIndexReader} instances are completely threadsafe, meaning multiple threads can call any of its methods,@@ -296,7 +288,7 @@ public abstract class IndexReader implements Cloneable,Closeable {}/** Returns a IndexReader reading the index in the given- * Directory, with readOnly=true.+ * Directory* @param directory the index directory* @throws CorruptIndexException if the index is corrupt* @throws IOException if there is a low-level IO error@@ -306,7 +298,7 @@ public abstract class IndexReader implements Cloneable,Closeable {}/** Returns a IndexReader reading the index in the given- * Directory, with readOnly=true.+ * Directory* @param directory the index directory* @param termInfosIndexDivisor Subsamples which indexed* terms are loaded into RAM. This has the same effect as {@link@@ -349,12 +341,8 @@ public abstract class IndexReader implements Cloneable,Closeable {}/** Expert: returns an IndexReader reading the index in the given- * {@link IndexCommit}. You should pass readOnly=true, since it- * gives much better concurrent performance, unless you- * intend to do write operations (delete documents or- * change norms) with the reader.+ * {@link IndexCommit}.* @param commit the commit point to open- * @param readOnly true if no changes (deletions, norms) will be made with this IndexReader* @throws CorruptIndexException if the index is corrupt* @throws IOException if there is a low-level IO error*/@@ -387,11 +375,6 @@ public abstract class IndexReader implements Cloneable,Closeable {* <code>SearcherManager</code> in* <code>contrib/misc</code> to simplify managing this.*- * <p>If a new reader is returned, it's safe to make changes- * (deletions, norms) with it. All shared mutable state- * with the old reader uses "copy on write" semantics to- * ensure the changes are not seen by other readers.- ** @throws CorruptIndexException if the index is corrupt* @throws IOException if there is a low-level IO error* @return null if there are no changes; else, a new@@ -405,13 +388,11 @@ public abstract class IndexReader implements Cloneable,Closeable {/*** If the IndexCommit differs from what the- * provided reader is searching, or the provided reader is- * not already read-only, open and return a new- * <code>readOnly=true</code> reader; else, return null.+ * provided reader is searching, open and return a new+ * reader; else, return null.** @see #openIfChanged(IndexReader)*/- // TODO: should you be able to specify readOnly?public static IndexReader openIfChanged(IndexReader oldReader, IndexCommit commit) throws IOException {final IndexReader newReader = oldReader.doOpenIfChanged(commit);assert newReader != oldReader;@@ -421,7 +402,7 @@ public abstract class IndexReader implements Cloneable,Closeable {/*** Expert: If there changes (committed or not) in the* {@link IndexWriter} versus what the provided reader is- * searching, then open and return a new read-only+ * searching, then open and return a new* IndexReader searching both committed and uncommitted* changes from the writer; else, return null (though, the* current implementation never returns null).@@ -429,7 +410,7 @@ public abstract class IndexReader implements Cloneable,Closeable {* <p>This provides "near real-time" searching, in that* changes made during an {@link IndexWriter} session can be* quickly made available for searching without closing- * the writer nor calling {@link #commit}.+ * the writer nor calling {@link IndexWriter#commit}.** <p>It's <i>near</i> real-time because there is no hard* guarantee on how quickly you can get a new reader after@@ -518,19 +499,6 @@ public abstract class IndexReader implements Cloneable,Closeable {/*** Efficiently clones the IndexReader (sharing most* internal state).- * <p>- * On cloning a reader with pending changes (deletions,- * norms), the original reader transfers its write lock to- * the cloned reader. This means only the cloned reader- * may make further changes to the index, and commit the- * changes to the index on close, but the old reader still- * reflects all changes made up until it was cloned.- * <p>- * Like {@link #openIfChanged(IndexReader)}, it's safe to make changes to- * either the original or the cloned reader: all shared- * mutable state obeys "copy on write" semantics to ensure- * the changes are not seen by other readers.- * <p>*/@Overridepublic synchronized Object clone() {@@ -1077,7 +1045,7 @@ public abstract class IndexReader implements Cloneable,Closeable {* one commit point. But if you're using a custom {@link* IndexDeletionPolicy} then there could be many commits.* Once you have a given commit, you can open a reader on- * it by calling {@link IndexReader#open(IndexCommit,boolean)}+ * it by calling {@link IndexReader#open(IndexCommit)}* There must be at least one commit in* the Directory, else this method throws {@link* IndexNotFoundException}. Note that if a commit is indiff --git a/lucene/src/java/org/apache/lucene/index/StaleReaderException.java b/lucene/src/java/org/apache/lucene/index/StaleReaderException.javadeleted file mode 100644index 734fb7322df..00000000000--- a/lucene/src/java/org/apache/lucene/index/StaleReaderException.java+++ /dev/null@@ -1,36 +0,0 @@-/**- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--package org.apache.lucene.index;--import java.io.IOException;--/**- * This exception is thrown when an {@link IndexReader}- * tries to make changes to the index (via {@link- * IndexReader#deleteDocument}, {@link- * IndexReader#undeleteAll} or {@link IndexReader#setNorm})- * but changes have already been committed to the index- * since this reader was instantiated. When this happens- * you must open a new reader on the current index to make- * the changes.- */-public class StaleReaderException extends IOException {- public StaleReaderException(String message) {- super(message);- }-}diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.javaindex 54ed1b92a9f..8fdde3f493d 100644--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java@@ -36,7 +36,7 @@ import org.apache.lucene.benchmark.byTask.utils.Config;* logging.* <li>log.step.[class Task Name] - specifies the same as 'log.step', only for a* particular task name. For example, log.step.AddDoc will be applied only for- * {@link AddDocTask}, but not for {@link DeleteDocTask}. It's a way to control+ * {@link AddDocTask}. It's a way to control* per task logging settings. If you want to omit logging for any other task,* include log.step=-1. The syntax is "log.step." together with the Task's* 'short' name (i.e., without the 'Task' part).