Create() public abstract method

Transform the specified input TokenStream
public abstract Create ( TokenStream input ) : TokenStream
input TokenStream
return TokenStream
コード例 #1
0
 /// <summary>
 /// checks for synonyms of "second" in synonyms-wordnet.txt </summary>
 private void CheckWordnetSynonyms(TokenFilterFactory factory)
 {
     Reader reader = new StringReader("second");
     TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
     stream = factory.Create(stream);
     assertTrue(stream is SynonymFilter);
     AssertTokenStreamContents(stream, new string[] { "second", "2nd", "two" }, new int[] { 1, 0, 0 });
 }
コード例 #2
0
 /// <summary>
 /// checks for synonyms of "GB" in synonyms.txt </summary>
 private void CheckSolrSynonyms(TokenFilterFactory factory)
 {
     Reader reader = new StringReader("GB");
     TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
     stream = factory.Create(stream);
     assertTrue(stream is SynonymFilter);
     AssertTokenStreamContents(stream, new string[] { "GB", "gib", "gigabyte", "gigabytes" }, new int[] { 1, 0, 0, 0 });
 }