improve javadocs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1395517 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-10-08 11:13:06 +00:00
parent 6d3ac7d5e0
commit d9b8651fc8
1 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ and proximity searches (though sentence identification is not provided by Lucene
Version matchVersion = Version.LUCENE_XY; // Substitute desired Lucene version for XY
Analyzer analyzer = new StandardAnalyzer(matchVersion); // or any other analyzer
TokenStream ts = analyzer.tokenStream("myfield", new StringReader("some text goes here"));
OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
OffsetAttribute offsetAtt = ts.addAttribute(OffsetAttribute.class);
try {
ts.reset(); // Resets this stream to the beginning. (Required)
@ -734,7 +734,7 @@ public final class PartOfSpeechAttributeImpl extends AttributeImpl
{@literal @Override}
protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
final Tokenizer source = new WhitespaceTokenizer(matchVersion, reader);
TokenStream result = new LengthFilter(source, 3, Integer.MAX_VALUE);
TokenStream result = new LengthFilter(true, source, 3, Integer.MAX_VALUE);
result = new PartOfSpeechTaggingFilter(result);
return new TokenStreamComponents(source, result);
}