GetEnablePositionIncrementsVersionDefault() публичный статический Метод

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
Результат bool
Пример #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);
 }
Пример #2
0
 /// <summary>Builds an analyzer with the stop words from the given set.</summary>
 public StopAnalyzer(Version matchVersion, ISet <string> stopWords)
 {
     this.stopWords           = stopWords;
     enablePositionIncrements = StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion);
 }
Пример #3
0
 /// <summary> Builds an analyzer which removes words in ENGLISH_STOP_WORDS.</summary>
 public StopAnalyzer(Version matchVersion)
 {
     stopWords = ENGLISH_STOP_WORDS_SET;
     enablePositionIncrements = StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion);
 }
Пример #4
0
 /// <summary> Builds an analyzer with the stop words from the given file.
 ///
 /// </summary>
 /// <seealso cref="WordlistLoader.getWordSet(File)">
 /// </seealso>
 /// <param name="matchVersion">See <a href="#version">above</a>
 /// </param>
 /// <param name="stopwordsFile">File to load stop words from
 /// </param>
 public StopAnalyzer(Version matchVersion, System.IO.FileInfo stopwordsFile)
 {
     stopWords = WordlistLoader.GetWordSet(stopwordsFile);
     this.enablePositionIncrements   = StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion);
     useDefaultStopPositionIncrement = false;
 }
Пример #5
0
 /// <summary>Builds an analyzer with the stop words from the given set.</summary>
 public StopAnalyzer(Version matchVersion, System.Collections.Hashtable stopWords)
 {
     this.stopWords = stopWords;
     useDefaultStopPositionIncrement = false;
     enablePositionIncrements        = StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion);
 }
Пример #6
0
 /// <summary>Builds an analyzer with the stop words from the given set.</summary>
 public StopAnalyzer(Version matchVersion, ICollection <string> stopWords)
 {
     this.stopWords = stopWords;
     useDefaultStopPositionIncrement = false;
     enablePositionIncrements        = StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion);
 }