mirror of https://github.com/apache/lucene.git
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:
parent
72ae3171be
commit
e825015535
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue