Fix StandardAnalyzer c-tor example to take Version

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1242498 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2012-02-09 19:59:55 +00:00
parent 72ae3171be
commit e825015535
1 changed files with 2 additions and 1 deletions

View File

@ -264,7 +264,8 @@ and proximity searches (though sentence identification is not provided by Lucene
{@link org.apache.lucene.analysis.Analyzer#getPositionIncrementGap(java.lang.String) Analyzer.getPositionIncrementGap(fieldName)}:
</p>
<PRE class="prettyprint">
Analyzer myAnalyzer = new StandardAnalyzer() {
Version matchVersion = Version.LUCENE_XY; // Substitute desired Lucene version for XY
Analyzer myAnalyzer = new StandardAnalyzer(matchVersion) {
public int getPositionIncrementGap(String fieldName) {
return 10;
}