Index: build.xml =================================================================== --- build.xml (revision 534568) +++ build.xml (working copy) @@ -17,6 +17,43 @@ + + + + + + + + + + + + + + + + + + @@ -429,6 +466,8 @@ + + Index: src/java/org/apache/lucene/queryParser/QueryParser.java =================================================================== --- src/java/org/apache/lucene/queryParser/QueryParser.java (revision 534568) +++ src/java/org/apache/lucene/queryParser/QueryParser.java (working copy) @@ -219,9 +219,14 @@ /** - * Set to true to allow * and ? as the first character - * of a PrefixQuery and WildcardQuery. Note that this can produce very slow - * queries on big indexes. Default: false. + * Set to true to allow leading wildcard characters. + *

+ * When set, * or ? are allowed as + * the first character of a PrefixQuery and WildcardQuery. + * Note that this can produce very slow + * queries on big indexes. + *

+ * Default: false. */ public void setAllowLeadingWildcard(boolean allowLeadingWildcard) { this.allowLeadingWildcard = allowLeadingWildcard; @@ -1253,6 +1258,16 @@ 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 @@ 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; Index: src/java/org/apache/lucene/queryParser/QueryParser.jj =================================================================== --- src/java/org/apache/lucene/queryParser/QueryParser.jj (revision 534568) +++ src/java/org/apache/lucene/queryParser/QueryParser.jj (working copy) @@ -243,9 +243,14 @@ /** - * Set to true to allow * and ? as the first character - * of a PrefixQuery and WildcardQuery. Note that this can produce very slow - * queries on big indexes. Default: false. + * Set to true to allow leading wildcard characters. + *

+ * When set, * or ? are allowed as + * the first character of a PrefixQuery and WildcardQuery. + * Note that this can produce very slow + * queries on big indexes. + *

+ * Default: false. */ public void setAllowLeadingWildcard(boolean allowLeadingWildcard) { this.allowLeadingWildcard = allowLeadingWildcard; Index: src/java/org/apache/lucene/analysis/Token.java =================================================================== --- src/java/org/apache/lucene/analysis/Token.java (revision 534568) +++ src/java/org/apache/lucene/analysis/Token.java (working copy) @@ -136,8 +136,8 @@ public final String type() { return type; } /** - * Sets this Token's payload.
- *
+ * Sets this Token's payload. + *

* * 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 @@ } /** - * Returns this Token's payload.
- *
+ * Returns this Token's payload. + *

* * Warning: The status of the Payloads feature is experimental. The APIs * introduced here might change in the future and will not be supported anymore Index: src/java/org/apache/lucene/search/FieldCache.java =================================================================== --- src/java/org/apache/lucene/search/FieldCache.java (revision 534568) +++ src/java/org/apache/lucene/search/FieldCache.java (working copy) @@ -54,16 +54,15 @@ } /** 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 @@ /** 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 field as integers and returns an array * of size reader.maxDoc() of the value each document @@ -175,4 +173,5 @@ */ public Comparable[] getCustom (IndexReader reader, String field, SortComparator comparator) throws IOException; + } Index: src/java/org/apache/lucene/search/Similarity.java =================================================================== --- src/java/org/apache/lucene/search/Similarity.java (revision 534568) +++ src/java/org/apache/lucene/search/Similarity.java (working copy) @@ -284,7 +284,7 @@ * * * @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 @@ * 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 @@ *

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 @@ * method usually return smaller values when numTokens is large, * and larger values when numTokens is small. * - *

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 + *

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 @@ * 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 @@ * * * 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. * Index: src/java/org/apache/lucene/index/TermPositions.java =================================================================== --- src/java/org/apache/lucene/index/TermPositions.java (revision 534568) +++ src/java/org/apache/lucene/index/TermPositions.java (working copy) @@ -83,8 +83,11 @@ 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. + *

+ * 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 * * * Index: src/java/org/apache/lucene/index/FieldReaderException.java =================================================================== --- src/java/org/apache/lucene/index/FieldReaderException.java (revision 534568) +++ src/java/org/apache/lucene/index/FieldReaderException.java (working copy) @@ -30,9 +30,11 @@ /** * Constructs a new runtime exception with the specified cause and a - * detail message of (cause==null ? null : cause.toString()) + * detail message of (cause==null ? null : cause.toString()) * (which typically contains the class and detail message of - * cause). This constructor is useful for runtime exceptions + * cause). + *

+ * 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 Index: src/java/org/apache/lucene/document/FieldSelectorResult.java =================================================================== --- src/java/org/apache/lucene/document/FieldSelectorResult.java (revision 534568) +++ src/java/org/apache/lucene/document/FieldSelectorResult.java (working copy) @@ -68,7 +68,7 @@ */ 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); Index: contrib/ant/src/java/org/apache/lucene/ant/TextDocument.java =================================================================== --- contrib/ant/src/java/org/apache/lucene/ant/TextDocument.java (revision 534568) +++ contrib/ant/src/java/org/apache/lucene/ant/TextDocument.java (working copy) @@ -30,7 +30,7 @@ * 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 */ Index: contrib/ant/src/java/org/apache/lucene/ant/FileExtensionDocumentHandler.java =================================================================== --- contrib/ant/src/java/org/apache/lucene/ant/FileExtensionDocumentHandler.java (revision 534568) +++ contrib/ant/src/java/org/apache/lucene/ant/FileExtensionDocumentHandler.java (working copy) @@ -27,7 +27,7 @@ * 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 Index: contrib/ant/src/java/org/apache/lucene/ant/DocumentHandler.java =================================================================== --- contrib/ant/src/java/org/apache/lucene/ant/DocumentHandler.java (revision 534568) +++ contrib/ant/src/java/org/apache/lucene/ant/DocumentHandler.java (working copy) @@ -25,7 +25,7 @@ * Allows a class to act as a Lucene document handler * *@author Erik Hatcher - *@created October 27, 2001 + *@since October 27, 2001 */ public interface DocumentHandler { Index: contrib/benchmark/src/java/org/apache/lucene/benchmark/standard/StandardOptions.java =================================================================== --- contrib/benchmark/src/java/org/apache/lucene/benchmark/standard/StandardOptions.java (revision 534568) +++ contrib/benchmark/src/java/org/apache/lucene/benchmark/standard/StandardOptions.java (working copy) @@ -42,7 +42,6 @@ /** * How often to print out log messages when in benchmark loops - * @return */ public int getLogStep() { @@ -56,7 +55,6 @@ /** * The number of times to run the benchmark - * @return */ public int getRunCount() { @@ -68,10 +66,6 @@ this.runCount = runCount; } - /** - * - * @return - */ public int getScaleUp() { return scaleUp; Index: contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java =================================================================== --- contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java (revision 534568) +++ contrib/benchmark/src/java/org/apache/lucene/benchmark/stats/TestRunData.java (working copy) @@ -123,7 +123,7 @@ 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) Index: contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java =================================================================== --- contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java (revision 534568) +++ contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java (working copy) @@ -911,6 +911,11 @@ throw new UnsupportedOperationException(); } + public boolean isPayloadAvailable() { + // TODO Auto-generated method stub + return false; + } + }; } Index: contrib/memory/src/java/org/apache/lucene/index/memory/PatternAnalyzer.java =================================================================== --- contrib/memory/src/java/org/apache/lucene/index/memory/PatternAnalyzer.java (revision 534568) +++ contrib/memory/src/java/org/apache/lucene/index/memory/PatternAnalyzer.java (working copy) @@ -65,7 +65,7 @@ */ public class PatternAnalyzer extends Analyzer { - /** "\\W+"; Divides text at non-letters (!Character.isLetter(c)) */ + /** "\\W+"; Divides text at non-letters (NOT Character.isLetter(c)) */ public static final Pattern NON_WORD_PATTERN = Pattern.compile("\\W+"); /** "\\s+"; Divides text at whitespaces (Character.isWhitespace(c)) */ Index: contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java =================================================================== --- contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java (revision 534568) +++ contrib/miscellaneous/src/java/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.java (working copy) @@ -29,8 +29,8 @@ /** * Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys - * are also passed through the given analyzer, but ? and * don't get - * removed from the search terms. + * are also passed through the given analyzer, but wild card characters (like *) + * don't get removed from the search terms. * *

Warning: 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,9 +55,12 @@ /** * 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 *), but is not a prefix term token (one + * that has just a single * character at the end). *

+ * Example: will be called for H?user or for H*user + * but not for *user. + *

* Depending on analyzer and settings, a wildcard term may (most probably will) * be lower-cased automatically. It will go through the default Analyzer. *

Index: contrib/miscellaneous/src/java/org/apache/lucene/index/FieldNormModifier.java =================================================================== --- contrib/miscellaneous/src/java/org/apache/lucene/index/FieldNormModifier.java (revision 534568) +++ contrib/miscellaneous/src/java/org/apache/lucene/index/FieldNormModifier.java (working copy) @@ -25,8 +25,10 @@ /** * 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. * *

* NOTE: This will overwrite any length normalization or field/document boosts. @@ -36,9 +38,9 @@ * @author Otis Gospodnetic */ public class FieldNormModifier { - + /** - * Command Line Execution method + * Command Line Execution method. * *

    * Usage: FieldNormModifier /path/index  field1 field2 ...
Index: contrib/miscellaneous/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java
===================================================================
--- contrib/miscellaneous/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java	(revision 534568)
+++ contrib/miscellaneous/src/java/org/apache/lucene/misc/SweetSpotSimilarity.java	(working copy)
@@ -118,10 +118,10 @@
   }
     
   /**
-   * Implimented as:
+   * Implemented as:
    * 
    * 1/sqrt( steepness * (abs(x-min) + abs(x-max) - (max-min)) + 1 )
-   * 
+   * .
    *
    * 

* This degrades to 1/sqrt(x) when min and max are both 1 and @@ -173,9 +173,9 @@ } /** - * Implimented as: + * Implemented as: * - * (x <= min) ? base : sqrt(x+(base**2)-min) + * (x <= min) ? base : sqrt(x+(base**2)-min) * * ...but with a special case check for 0. *

Index: contrib/miscellaneous/src/java/org/apache/lucene/misc/LengthNormModifier.java =================================================================== --- contrib/miscellaneous/src/java/org/apache/lucene/misc/LengthNormModifier.java (revision 534568) +++ contrib/miscellaneous/src/java/org/apache/lucene/misc/LengthNormModifier.java (working copy) @@ -42,7 +42,7 @@ public class LengthNormModifier { /** - * Command Line Execution method + * Command Line Execution method. * *

    * Usage: LengthNormModifier /path/index package.SimilarityClassName field1 field2 ...