public override TokenStream ReusableTokenStream(System.String fieldName, System.IO.TextReader reader)
 {
     Tokenizer tokenizer = (Tokenizer) GetPreviousTokenStream();
     if (tokenizer == null)
     {
         tokenizer = new LowerCaseTokenizer(reader);
         SetPreviousTokenStream(tokenizer);
     }
     else
         tokenizer.Reset(reader);
     return tokenizer;
 }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="fieldName"></param>
        /// <param name="reader"></param>
        /// <returns></returns>
        public override TokenStream ReusableTokenStream(System.String fieldName, System.IO.TextReader reader)
        {
            Tokenizer tokenizer = (Tokenizer)GetPreviousTokenStream();

            if (tokenizer == null)
            {
                tokenizer = new LowerCaseTokenizer(reader);
                SetPreviousTokenStream(tokenizer);
            }
            else
            {
                tokenizer.Reset(reader);
            }
            return(tokenizer);
        }
        public override TokenStream TokenStream(System.String fieldName, System.IO.TextReader reader)
        {
            TokenStream result = new LowerCaseTokenizer(reader);

            return(new PayloadFilter(result, fieldName));
        }
 public override TokenStream TokenStream(System.String fieldName, System.IO.TextReader reader)
 {
     TokenStream result = new LowerCaseTokenizer(reader);
     return new PayloadFilter(result, fieldName);
 }
        /*
         * (non-Javadoc)
         * 
         * @see org.apache.lucene.analysis.Analyzer#tokenStream(java.lang.String,
         *      java.io.Reader)
         */

        public override TokenStream TokenStream(String arg0, System.IO.TextReader arg1)
        {
            LowerCaseTokenizer stream = new LowerCaseTokenizer(arg1);
            stream.AddAttribute<ITermAttribute>();
            stream.AddAttribute<IPositionIncrementAttribute>();
            stream.AddAttribute<IOffsetAttribute>();
            return new SynonymTokenizer(stream, synonyms);
        }
 public override TokenStream TokenStream(string fieldName, System.IO.TextReader reader)
 {
     TokenStream tokenizer = new LowerCaseTokenizer(reader);
     tokenizer = new ASCIIFoldingFilter(tokenizer);
     return tokenizer;
 }