Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

javadoc warnings and errors solved (except for gdata). build.xml "javadocs" target will now fail if there are javadoc warnings/errors under jdk1.4.

Doron Cohen8ed11daae025
diff --git a/CHANGES.txt b/CHANGES.txt
index 6100929aacd..82d8c6b97fd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -169,6 +169,12 @@ Documentation:
java.util.Comparator.compare(): Any integer is allowed to be returned
instead of only -1/0/1.
(Paul Cowan via Michael Busch)
+
+ 3. LUCENE-875: Solved javadoc warnings & errors under jdk1.4.
+ Solved javadoc errors under jdk5 (jars in path for gdata).
+ Set javadoc target to fail if there are errors or warnings.
+ For now allow warnings under jdk5 (until gdata javadocs are fixed).
+ (Doron Cohen)
======================= Release 2.1.0 2007-02-14 =======================
diff --git a/build.xml b/build.xml
index 4f563239938..7c53c2c6110 100644
--- a/build.xml
+++ b/build.xml
@@ -17,6 +17,38 @@
<pathelement location="${build.dir}/classes/java"/>
</path>
+ <!-- Javadoc classpath -->
+ <path id="javadoc.classpath">
+ <path refid="classpath"/>
+ <pathelement location="${ant.home}/lib/ant.jar"/>
+ <pathelement location="contrib/lucli/lib/jline.jar"/>
+ <pathelement location="contrib/regex/lib/jakarta-regexp-1.4.jar"/>
+ <pathelement location="contrib/benchmark/commons-beanutils-1.7.0.jar"/>
+ <pathelement location="contrib/benchmark/lib/commons-collections-3.1.jar"/>
+ <pathelement location="contrib/benchmark/lib/commons-digester-1.7.jar"/>
+ <pathelement location="contrib/benchmark/lib/commons-logging-1.0.4.jar"/>
+ <pathelement location="contrib/ant/lib/Tidy.jar"/>
+ <!-- gdata jars only used with jdk 5 but include them even for lower jdk -->
+ <pathelement location="contrib/gdata-server/lib/commons-beanutils.jar"/>
+ <pathelement location="contrib/gdata-server/lib/commons-collections-3.2.jar"/>
+ <pathelement location="contrib/gdata-server/lib/commons-digester-1.7.jar"/>
+ <pathelement location="contrib/gdata-server/lib/commons-logging-1.1.jar"/>
+ <pathelement location="contrib/gdata-server/lib/gdata-client-1.0.jar"/>
+ <pathelement location="contrib/gdata-server/lib/log4j-1.2.13.jar"/>
+ <pathelement location="contrib/gdata-server/lib/nekohtml.jar"/>
+ <pathelement location="contrib/gdata-server/lib/servlet-api.jar"/>
+ <pathelement location="contrib/gdata-server/lib/xercesImpl.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/easymock-1.2_Java1.5.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/hessian-3.0.20.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/hivemind-1.1.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/hivemind-jmx-1.1.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/hivemind-lib-1.1.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/javassist-3.0.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/oro-2.0.6.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/stax-1.1.2-dev.jar"/>
+ <pathelement location="contrib/gdata-server/ext-lib/stax-api-1.0.1.jar"/>
+ </path>
+
<path id="demo.classpath">
<path refid="classpath"/>
<pathelement location="${build.dir}/classes/demo"/>
@@ -366,7 +398,10 @@
<include name="**" if="javadoc-1-5-contrib" />
</dirset>
+ <record name="log_javadoc.txt" action="start" append="no"/>
+
<javadoc
+ failonerror="true"
overview="src/java/overview.html"
packagenames="org.apache.lucene.*"
destdir="@{destdir}"
@@ -413,7 +448,7 @@
<group title="contrib: Analysis" packages="org.apache.lucene.analysis.*"/>
<group title="contrib: Ant" packages="org.apache.lucene.ant*"/>
- <group title="contrib: Benchmark" packages="org.apache.lucene.benchmark*"/>
+ <group title="contrib: Benchmark" packages="org.apache.lucene.benchmark*"/>
<group title="contrib: Highlighter" packages="org.apache.lucene.search.highlight*"/>
<group title="contrib: GData Server (Java1.5)" packages="org.apache.lucene.gdata.*"/>
<group title="contrib: Lucli" packages="lucli*"/>
@@ -429,7 +464,33 @@
<group title="contrib: WordNet" packages="org.apache.lucene.wordnet*"/>
+ <classpath refid="javadoc.classpath"/>
+
</javadoc>
+
+ <record name="log_javadoc.txt" action="stop"/>
+
+ <delete>
+ <fileset file="log_javadoc.txt">
+ <not>
+ <containsregexp expression="\[javadoc\]\s*[1-9][0-9]*[\s]*warning"/>
+ </not>
+ </fileset>
+ </delete>
+
+ <fail message="Javadocs warnings were found!">
+ <condition>
+ <and>
+ <available file="log_javadoc.txt"/>
+ <not>
+ <!-- TODO: once gdata javadocs are fixed, remove this part of the 'and' (and the 'and' itself...) -->
+ <isset property="javadoc-1-5-contrib"/>
+ </not>
+ </and>
+ </condition>
+ </fail>
+
+
</sequential>
</macrodef>
diff --git a/contrib/ant/src/java/org/apache/lucene/ant/DocumentHandler.java b/contrib/ant/src/java/org/apache/lucene/ant/DocumentHandler.java
index b897d9bcc22..9cb38d7eb9e 100644
--- a/contrib/ant/src/java/org/apache/lucene/ant/DocumentHandler.java
+++ b/contrib/ant/src/java/org/apache/lucene/ant/DocumentHandler.java
@@ -25,7 +25,7 @@ import java.io.File;
* Allows a class to act as a Lucene document handler
*
*@author Erik Hatcher
- *@created October 27, 2001
+ *@since October 27, 2001
*/
public interface DocumentHandler {
diff --git a/contrib/ant/src/java/org/apache/lucene/ant/FileExtensionDocumentHandler.java b/contrib/ant/src/java/org/apache/lucene/ant/FileExtensionDocumentHandler.java
index 8b13919e277..e97fd39c2ab 100644
--- a/contrib/ant/src/java/org/apache/lucene/ant/FileExtensionDocumentHandler.java
+++ b/contrib/ant/src/java/org/apache/lucene/ant/FileExtensionDocumentHandler.java
@@ -27,7 +27,7 @@ import java.io.File;
* files are handled, other extensions ignored.
*
*@author Erik Hatcher
- *@created October 28, 2001
+ *@since October 28, 2001
*@todo Implement dynamic document type lookup
*/
public class FileExtensionDocumentHandler
diff --git a/contrib/ant/src/java/org/apache/lucene/ant/TextDocument.java b/contrib/ant/src/java/org/apache/lucene/ant/TextDocument.java
index 8630bd56a2d..6efd0bbd722 100644
--- a/contrib/ant/src/java/org/apache/lucene/ant/TextDocument.java
+++ b/contrib/ant/src/java/org/apache/lucene/ant/TextDocument.java
@@ -30,7 +30,7 @@ import java.io.StringWriter;
* A utility for making Lucene Documents from a File.
*
*@author Erik Hatcher
- *@created December 6, 2001
+ *@since December 6, 2001
*@todo Fix JavaDoc comments here
*/
diff --git a/contrib/benchmark/src/java/org/apache/lucene/benchmark/standard/StandardOptions.java b/contrib/benchmark/src/java/org/apache/lucene/benchmark/standard/StandardOptions.java
index d862579e9a5..8f650b4c385 100644
--- a/contrib/benchmark/src/java/org/apache/lucene/benchmark/standard/StandardOptions.java
+++ b/contrib/benchmark/src/java/org/apache/lucene/benchmark/standard/StandardOptions.java
@@ -42,7 +42,6 @@ public class StandardOptions implements BenchmarkOptions
/**
* How often to print out log messages when in benchmark loops
- * @return
*/
public int getLogStep()
{
@@ -56,7 +55,6 @@ public class StandardOptions implements BenchmarkOptions
/**
* The number of times to run the benchmark
- * @return
*/
public int getRunCount()
{
@@ -68,10 +66,6 @@ public class StandardOptions implements BenchmarkOptions
this.runCount = runCount;
}
- /**
- *
- * @return
- */
public int getScaleUp()
{
return scaleUp;
diff --git a/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java b/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java
index f34c8b7182e..929c88c55b4 100644
--- a/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java
+++ b/contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java
@@ -123,7 +123,7 @@ public class TestRunData {
return v;
}
- /** Get memory usage stats. for a given data type. */
+ /** Get memory usage stats for a given data type. */
public MemUsage getMemUsage(String label) {
Vector v = (Vector) data.get(label);
if (v == null)
diff --git a/contrib/memory/src/java/org/apache/lucene/index/memory/PatternAnalyzer.java b/contrib/memory/src/java/org/apache/lucene/index/memory/PatternAnalyzer.java
index 1d1c25d399e..183367dd93c 100644
--- a/contrib/memory/src/java/org/apache/lucene/index/memory/PatternAnalyzer.java
+++ b/contrib/memory/src/java/org/apache/lucene/index/memory/PatternAnalyzer.java
@@ -65,7 +65,7 @@ import org.apache.lucene.analysis.TokenStream;
*/
public class PatternAnalyzer extends Analyzer {
- /** <code>"\\W+"</code>; Divides text at non-letters (!Character.isLetter(c)) */
+ /** <code>"\\W+"</code>; Divides text at non-letters (NOT Character.isLetter(c)) */
public static final Pattern NON_WORD_PATTERN = Pattern.compile("\\W+");
/** <code>"\\s+"</code>; Divides text at whitespaces (Character.isWhitespace(c)) */
diff --git a/contrib/miscellaneous/src/java/org/apache/lucene/index/FieldNormModifier.java b/contrib/miscellaneous/src/java/org/apache/lucene/index/FieldNormModifier.java
index cb89e5ebf72..761425dc0c8 100644
--- a/contrib/miscellaneous/src/java/org/apache/lucene/index/FieldNormModifier.java
+++ b/contrib/miscellaneous/src/java/org/apache/lucene/index/FieldNormModifier.java
@@ -25,8 +25,10 @@ import org.apache.lucene.store.FSDirectory;
/**
* Given a directory and a list of fields, updates the fieldNorms in place for every document.
+ *
* If Similarity class is specified, uses its lengthNorm method to set norms.
- * If -n command line argument is used, removed field norms, as if {@link Field.Index.NO_NORMS} was used.
+ * If -n command line argument is used, removed field norms, as if
+ * {@link org.apache.lucene.document.Field.Index}.NO_NORMS was used.
*
* <p>
* NOTE: This will overwrite any length normalization or field/document boosts.
@@ -36,9 +38,9 @@ import org.apache.lucene.store.FSDirectory;
* @author Otis Gospodnetic
*/
public class FieldNormModifier {
-
+
/**
- * Command Line Execution method
+ * Command Line Execution method.
*
* <pre>
* Usage: FieldNormModifier /path/index <package.SimilarityClassName | -n> field1 field2 ...
diff --git a/contrib/miscellaneous/src/java/org/apache/lucene/misc/LengthNormModifier.java b/contrib/miscellaneous/src/java/org/apache/lucene/misc/LengthNormModifier.java
index 12def6f3808..427253f2d3b 100644
--- a/contrib/miscellaneous/src/java/org/apache/lucene/misc/LengthNormModifier.java
+++ b/contrib/miscellaneous/src/java/org/apache/lucene/misc/LengthNormModifier.java
@@ -42,7 +42,7 @@ import java.util.Date;
public class LengthNormModifier {
/**
- * Command Line Execution method
+ * Command Line Execution method.
*
* <pre>
* Usage: LengthNormModifier /path/index package.SimilarityClassName field1 field2 ...
diff --git a/contrib/miscellaneous/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java b/contrib/miscellaneous/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java
index 8247bd8a305..8913efea7d1 100644
--- a/contrib/miscellaneous/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java
+++ b/contrib/miscellaneous/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java
@@ -118,10 +118,10 @@ public class SweetSpotSimilarity extends DefaultSimilarity {
}
/**
- * Implimented as:
+ * Implemented as:
* <code>
* 1/sqrt( steepness * (abs(x-min) + abs(x-max) - (max-min)) + 1 )
- * </code>
+ * </code>.
*
* <p>
* This degrades to <code>1/sqrt(x)</code> when min and max are both 1 and
@@ -173,9 +173,9 @@ public class SweetSpotSimilarity extends DefaultSimilarity {
}
/**
- * Implimented as:
+ * Implemented as:
* <code>
- * (x &lt;= min) ? base : sqrt(x+(base**2)-min)
+ * (x &lt;= min) &#63; base : sqrt(x+(base**2)-min)
* </code>
* ...but with a special case check for 0.
* <p>
diff --git a/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java b/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java
index abc2976f065..4518eaa0cc5 100644
--- a/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java
+++ b/contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java
@@ -29,8 +29,8 @@ import org.apache.lucene.search.Query;
/**
* Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys
- * are also passed through the given analyzer, but <code>?</code> and <code>*</code> don't get
- * removed from the search terms.
+ * are also passed through the given analyzer, but wild card characters (like <code>*</code>)
+ * don't get removed from the search terms.
*
* <p><b>Warning:</b> This class should only be used with analyzers that do not use stopwords
* or that add tokens. Also, several stemming analyzers are inappropriate: for example, GermanAnalyzer
@@ -55,8 +55,11 @@ public class AnalyzingQueryParser extends org.apache.lucene.queryParser.QueryPar
/**
* Called when parser
* parses an input term token that contains one or more wildcard
- * characters (? and *), but is not a prefix term token (one
- * that has just a single * character at the end)
+ * characters (like <code>*</code>), but is not a prefix term token (one
+ * that has just a single * character at the end).
+ * <p>
+ * Example: will be called for <code>H?user</code> or for <code>H*user</code>
+ * but not for <code>*user</code>.
* <p>
* Depending on analyzer and settings, a wildcard term may (most probably will)
* be lower-cased automatically. It <b>will</b> go through the default Analyzer.
diff --git a/src/java/org/apache/lucene/analysis/Token.java b/src/java/org/apache/lucene/analysis/Token.java
index bdd7e34abea..38d23495d11 100644
--- a/src/java/org/apache/lucene/analysis/Token.java
+++ b/src/java/org/apache/lucene/analysis/Token.java
@@ -136,8 +136,8 @@ public class Token implements Cloneable {
public final String type() { return type; }
/**
- * Sets this Token's payload.<br>
- * <br>
+ * Sets this Token's payload.
+ * <p>
* <b>
* Warning: The status of the Payloads feature is experimental. The APIs
* introduced here might change in the future and will not be supported anymore
@@ -151,8 +151,8 @@ public class Token implements Cloneable {
}
/**
- * Returns this Token's payload.<br>
- * <br>
+ * Returns this Token's payload.
+ * <p>
* <b>
* Warning: The status of the Payloads feature is experimental. The APIs
* introduced here might change in the future and will not be supported anymore
diff --git a/src/java/org/apache/lucene/document/FieldSelectorResult.java b/src/java/org/apache/lucene/document/FieldSelectorResult.java
index 0dac759a835..e92bec2d05a 100755
--- a/src/java/org/apache/lucene/document/FieldSelectorResult.java
+++ b/src/java/org/apache/lucene/document/FieldSelectorResult.java
@@ -68,7 +68,7 @@ public final class FieldSelectorResult implements Serializable {
*/
public transient static final FieldSelectorResult SIZE = new FieldSelectorResult(5);
- /** Expert: Like {@link #SIZE} but immediately break from the field loading loop, i.e. stop loading further fields, after the size is loaded */
+ /** Expert: Like {@link #SIZE} but immediately break from the field loading loop, i.e., stop loading further fields, after the size is loaded */
public transient static final FieldSelectorResult SIZE_AND_BREAK = new FieldSelectorResult(6);
diff --git a/src/java/org/apache/lucene/index/FieldReaderException.java b/src/java/org/apache/lucene/index/FieldReaderException.java
index 332aa2b5f9b..1243731aa69 100755
--- a/src/java/org/apache/lucene/index/FieldReaderException.java
+++ b/src/java/org/apache/lucene/index/FieldReaderException.java
@@ -30,9 +30,11 @@ public class FieldReaderException extends RuntimeException{
/**
* Constructs a new runtime exception with the specified cause and a
- * detail message of <tt>(cause==null ? null : cause.toString())</tt>
+ * detail message of <tt>(cause==null &#63; null : cause.toString())</tt>
* (which typically contains the class and detail message of
- * <tt>cause</tt>). This constructor is useful for runtime exceptions
+ * <tt>cause</tt>).
+ * <p>
+ * This constructor is useful for runtime exceptions
* that are little more than wrappers for other throwables.
*
* @param cause the cause (which is saved for later retrieval by the
diff --git a/src/java/org/apache/lucene/index/TermPositions.java b/src/java/org/apache/lucene/index/TermPositions.java
index 2c462fdd42e..d4864c9ce0a 100644
--- a/src/java/org/apache/lucene/index/TermPositions.java
+++ b/src/java/org/apache/lucene/index/TermPositions.java
@@ -83,8 +83,11 @@ public interface TermPositions
byte[] getPayload(byte[] data, int offset) throws IOException;
/**
- * Can we load the payload at this position? Payloads can only be loaded once per call
- * to {@link #nextPosition()}
+ * Checks if a payload can be loaded at this position.
+ * <p>
+ * Payloads can only be loaded once per call to
+ * {@link #nextPosition()}.
+ *
* @return true if there is a payload available at this position that can be loaded
*
* * <b>
diff --git a/src/java/org/apache/lucene/queryParser/QueryParser.java b/src/java/org/apache/lucene/queryParser/QueryParser.java
index 14b2611d4e2..742a6a9b121 100644
--- a/src/java/org/apache/lucene/queryParser/QueryParser.java
+++ b/src/java/org/apache/lucene/queryParser/QueryParser.java
@@ -219,9 +219,14 @@ public class QueryParser implements QueryParserConstants {
/**
- * Set to <code>true</code> to allow <code>*</code> and <code>?</code> as the first character
- * of a PrefixQuery and WildcardQuery. Note that this can produce very slow
- * queries on big indexes. Default: false.
+ * Set to <code>true</code> to allow leading wildcard characters.
+ * <p>
+ * When set, <code>*</code> or <code>?</code> are allowed as
+ * the first character of a PrefixQuery and WildcardQuery.
+ * Note that this can produce very slow
+ * queries on big indexes.
+ * <p>
+ * Default: false.
*/
public void setAllowLeadingWildcard(boolean allowLeadingWildcard) {
this.allowLeadingWildcard = allowLeadingWildcard;
@@ -1253,6 +1258,16 @@ public class QueryParser implements QueryParserConstants {
finally { jj_save(0, xla); }
}
+ final private boolean jj_3_1() {
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_2()) {
+ jj_scanpos = xsp;
+ if (jj_3R_3()) return true;
+ }
+ return false;
+ }
+
final private boolean jj_3R_3() {
if (jj_scan_token(STAR)) return true;
if (jj_scan_token(COLON)) return true;
@@ -1265,16 +1280,6 @@ public class QueryParser implements QueryParserConstants {
return false;
}
- final private boolean jj_3_1() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_2()) {
- jj_scanpos = xsp;
- if (jj_3R_3()) return true;
- }
- return false;
- }
-
public QueryParserTokenManager token_source;
public Token token, jj_nt;
private int jj_ntk;
diff --git a/src/java/org/apache/lucene/queryParser/QueryParser.jj b/src/java/org/apache/lucene/queryParser/QueryParser.jj
index cb20a53df24..30565728adc 100644
--- a/src/java/org/apache/lucene/queryParser/QueryParser.jj
+++ b/src/java/org/apache/lucene/queryParser/QueryParser.jj
@@ -243,9 +243,14 @@ public class QueryParser {
/**
- * Set to <code>true</code> to allow <code>*</code> and <code>?</code> as the first character
- * of a PrefixQuery and WildcardQuery. Note that this can produce very slow
- * queries on big indexes. Default: false.
+ * Set to <code>true</code> to allow leading wildcard characters.
+ * <p>
+ * When set, <code>*</code> or <code>?</code> are allowed as
+ * the first character of a PrefixQuery and WildcardQuery.
+ * Note that this can produce very slow
+ * queries on big indexes.
+ * <p>
+ * Default: false.
*/
public void setAllowLeadingWildcard(boolean allowLeadingWildcard) {
this.allowLeadingWildcard = allowLeadingWildcard;
diff --git a/src/java/org/apache/lucene/search/FieldCache.java b/src/java/org/apache/lucene/search/FieldCache.java
index 3d5e6e8c717..77dcd910f38 100644
--- a/src/java/org/apache/lucene/search/FieldCache.java
+++ b/src/java/org/apache/lucene/search/FieldCache.java
@@ -54,16 +54,15 @@ public interface FieldCache {
}
/** Interface to parse ints from document fields.
- * @see #getInts(IndexReader, String, IntParser)
+ * @see FieldCache#getInts(IndexReader, String, FieldCache.IntParser)
*/
public interface IntParser {
/** Return an integer representation of this field's value. */
public int parseInt(String string);
}
-
/** Interface to parse floats from document fields.
- * @see #getFloats(IndexReader, String, FloatParser)
+ * @see FieldCache#getFloats(IndexReader, String, FieldCache.FloatParser)
*/
public interface FloatParser {
/** Return an float representation of this field's value. */
@@ -73,7 +72,6 @@ public interface FieldCache {
/** Expert: The cache used internally by sorting and range query classes. */
public static FieldCache DEFAULT = new FieldCacheImpl();
-
/** Checks the internal cache for an appropriate entry, and if none is
* found, reads the terms in <code>field</code> as integers and returns an array
* of size <code>reader.maxDoc()</code> of the value each document
@@ -175,4 +173,5 @@ public interface FieldCache {
*/
public Comparable[] getCustom (IndexReader reader, String field, SortComparator comparator)
throws IOException;
+
}
diff --git a/src/java/org/apache/lucene/search/Similarity.java b/src/java/org/apache/lucene/search/Similarity.java
index 6e5dd102887..8af1dda39a0 100644
--- a/src/java/org/apache/lucene/search/Similarity.java
+++ b/src/java/org/apache/lucene/search/Similarity.java
@@ -284,7 +284,7 @@ import java.util.Iterator;
* </ol>
*
* @see #setDefault(Similarity)
- * @see IndexWriter#setSimilarity(Similarity)
+ * @see org.apache.lucene.index.IndexWriter#setSimilarity(Similarity)
* @see Searcher#setSimilarity(Similarity)
*/
public abstract class Similarity implements Serializable {
@@ -295,7 +295,7 @@ public abstract class Similarity implements Serializable {
* code.
*
* @see Searcher#setSimilarity(Similarity)
- * @see IndexWriter#setSimilarity(Similarity)
+ * @see org.apache.lucene.index.IndexWriter#setSimilarity(Similarity)
*/
public static void setDefault(Similarity similarity) {
Similarity.defaultImpl = similarity;
@@ -307,7 +307,7 @@ public abstract class Similarity implements Serializable {
* <p>This is initially an instance of {@link DefaultSimilarity}.
*
* @see Searcher#setSimilarity(Similarity)
- * @see IndexWriter#setSimilarity(Similarity)
+ * @see org.apache.lucene.index.IndexWriter#setSimilarity(Similarity)
*/
public static Similarity getDefault() {
return Similarity.defaultImpl;
@@ -344,9 +344,11 @@ public abstract class Similarity implements Serializable {
* method usually return smaller values when <code>numTokens</code> is large,
* and larger values when <code>numTokens</code> is small.
*
- * <p>That these values are computed under {@link
- * IndexWriter#addDocument(org.apache.lucene.document.Document)} and stored then using
- * {@link #encodeNorm(float)}. Thus they have limited precision, and documents
+ * <p>That these values are computed under
+ * {@link org.apache.lucene.index.IndexWriter#addDocument(org.apache.lucene.document.Document)}
+ * and stored then using
+ * {@link #encodeNorm(float)}.
+ * Thus they have limited precision, and documents
* must be re-indexed if this method is altered.
*
* @param fieldName the name of the field
@@ -382,7 +384,7 @@ public abstract class Similarity implements Serializable {
* value.
*
* @see org.apache.lucene.document.Field#setBoost(float)
- * @see SmallFloat
+ * @see org.apache.lucene.util.SmallFloat
*/
public static byte encodeNorm(float f) {
return SmallFloat.floatToByte315(f);
@@ -445,7 +447,7 @@ public abstract class Similarity implements Serializable {
* </pre>
*
* Note that {@link Searcher#maxDoc()} is used instead of
- * {@link IndexReader#numDocs()} because it is proportional to
+ * {@link org.apache.lucene.index.IndexReader#numDocs()} because it is proportional to
* {@link Searcher#docFreq(Term)} , i.e., when one is inaccurate,
* so is the other, and in the same direction.
*