AddStopWords() public method

public AddStopWords ( IndexReader reader ) : int
reader Lucene.Net.Index.IndexReader
return int
 public void TestTokenStream()
 {
     QueryAutoStopWordAnalyzer a = new QueryAutoStopWordAnalyzer(Version.LUCENE_CURRENT, new WhitespaceAnalyzer());
     a.AddStopWords(reader, 10);
     TokenStream ts = a.TokenStream("repetitiveField", new StringReader("this boring"));
     ITermAttribute termAtt = ts.GetAttribute<ITermAttribute>();
     Assert.True(ts.IncrementToken());
     Assert.AreEqual("this", termAtt.Term);
     Assert.False(ts.IncrementToken());
 }
 public void TestWrappingNonReusableAnalyzer()
 {
     QueryAutoStopWordAnalyzer a = new QueryAutoStopWordAnalyzer(Version.LUCENE_CURRENT, new NonreusableAnalyzer());
     a.AddStopWords(reader, 10);
     int numHits = Search(a, "repetitiveField:boring");
     Assert.True(numHits == 0);
     numHits = Search(a, "repetitiveField:vaguelyboring");
     Assert.True(numHits == 0);
 }