Skip to content

Apache Lucene open-source search software

small javadoc improvements

Daniel Naberca5b0a3ca038
diff --git a/src/java/org/apache/lucene/analysis/WordlistLoader.java b/src/java/org/apache/lucene/analysis/WordlistLoader.java
index c03e8af82f9..20b77a6e114 100644
--- a/src/java/org/apache/lucene/analysis/WordlistLoader.java
+++ b/src/java/org/apache/lucene/analysis/WordlistLoader.java
@@ -37,7 +37,7 @@ public class WordlistLoader {
* Loads a text file and adds every line as an entry to a HashSet (omitting
* leading and trailing whitespace). Every line of the file should contain only
* one word. The words need to be in lowercase if you make use of an
- * Analyzer which uses LowerCaseFilter (like GermanAnalyzer).
+ * Analyzer which uses LowerCaseFilter (like StandardAnalyzer).
*
* @param wordfile File containing the wordlist
* @return A HashSet with the file's words
@@ -56,6 +56,15 @@ public class WordlistLoader {
return result;
}
+ /**
+ * Reads lines from a Reader and adds every line as an entry to a HashSet (omitting
+ * leading and trailing whitespace). Every line of the Reader should contain only
+ * one word. The words need to be in lowercase if you make use of an
+ * Analyzer which uses LowerCaseFilter (like StandardAnalyzer).
+ *
+ * @param reader Reader containing the wordlist
+ * @return A HashSet with the reader's words
+ */
public static HashSet getWordSet(Reader reader) throws IOException {
HashSet result = new HashSet();
BufferedReader br = null;
diff --git a/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java b/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
index bd6b223998e..a84090f446d 100644
--- a/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
+++ b/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
@@ -46,11 +46,16 @@ public class StandardAnalyzer extends Analyzer {
stopSet = StopFilter.makeStopSet(stopWords);
}
- /** Builds an analyzer with the stop words from the given file. */
+ /** Builds an analyzer with the stop words from the given file.
+ * @see WordlistLoader#getWordSet(File)
+ */
public StandardAnalyzer(File stopwords) throws IOException {
stopSet = WordlistLoader.getWordSet(stopwords);
}
+ /** Builds an analyzer with the stop words from the given reader.
+ * @see WordlistLoader#getWordSet(Reader)
+ */
public StandardAnalyzer(Reader stopwords) throws IOException {
stopSet = WordlistLoader.getWordSet(stopwords);
}