Lucene.Net.Analysis.TokenStream.Reset C# (CSharp) Метод

Reset() публичный Метод

Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. Reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement Reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after Reset()).
public Reset ( ) : void
Результат void
		public virtual void  Reset()
		{
		}
		

Usage Example

Пример #1
0
        protected internal virtual void ToDotFile(Analyzer a, string inputText, string localFileName)
        {
            StreamWriter w  = new StreamWriter(new FileStream(localFileName, FileMode.Open), IOUtils.CHARSET_UTF_8);
            TokenStream  ts = a.TokenStream("field", new StreamReader(inputText));

            ts.Reset();
            (new TokenStreamToDot(inputText, ts, /* new PrintWriter(*/ w /*)*/)).ToDot();
            w.Close();
        }
All Usage Examples Of Lucene.Net.Analysis.TokenStream::Reset