SetTokenStream() public method

Expert: sets the token stream to be used for indexing and causes isIndexed() and isTokenized() to return true. May be combined with stored values from stringValue() or GetBinaryValue()
public SetTokenStream ( Lucene.Net.Analysis.TokenStream tokenStream ) : void
tokenStream Lucene.Net.Analysis.TokenStream
return void
示例#1
0
 private void TrySetTokenStreamValue(Field f)
 {
     try
     {
         f.SetTokenStream(new CannedTokenStream(new Token("foo", 0, 3)));
         Assert.Fail();
     }
     catch (Exception expected) when(expected.IsIllegalArgumentException())
     {
         // expected
     }
 }
示例#2
0
        private void TrySetTokenStreamValue(Field f)
        {
            try
            {
                f.SetTokenStream(new CannedTokenStream(new Token("foo", 0, 3)));
                Assert.Fail();
            }
#pragma warning disable 168
            catch (System.ArgumentException expected)
#pragma warning restore 168
            {
                // expected
            }
        }