Lucene.Net.Analysis.StopFilter.GetEnablePositionIncrementsVersionDefault C# (CSharp) Method

GetEnablePositionIncrementsVersionDefault() public static method

Returns version-dependent default for enablePositionIncrements. Analyzers that embed StopFilter use this method when creating the StopFilter. Prior to 2.9, this returns false. On 2.9 or later, it returns true.
public static GetEnablePositionIncrementsVersionDefault ( Lucene.Net.Util.Version matchVersion ) : bool
matchVersion Lucene.Net.Util.Version
return bool
		public static bool GetEnablePositionIncrementsVersionDefault(Version matchVersion)
		{
            return matchVersion.OnOrAfter(Version.LUCENE_29);
		}

Usage Example

Beispiel #1
0
 /// <summary>Builds an analyzer with the stop words from the given reader. </summary>
 /// <seealso cref="WordlistLoader.GetWordSet(System.IO.TextReader)">
 /// </seealso>
 /// <param name="matchVersion">See <a href="#Version">above</a>
 /// </param>
 /// <param name="stopwords">Reader to load stop words from
 /// </param>
 public StopAnalyzer(Version matchVersion, System.IO.TextReader stopwords)
 {
     stopWords = WordlistLoader.GetWordSet(stopwords);
     enablePositionIncrements = StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion);
 }
All Usage Examples Of Lucene.Net.Analysis.StopFilter::GetEnablePositionIncrementsVersionDefault