lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craiglan...@gmail.com
Subject Re: usage of CollationAttributeFactory StandardTokenizer Analyzer
Date Mon, 14 Apr 2014 18:07:13 GMT

Sent from my BlackBerry® smartphone

-----Original Message-----
From: Cemo <cemalettin.koc@gmail.com>
Date: Thu, 31 Jul 2014 11:04:18 
To: <java-user@lucene.apache.org>
Reply-To: java-user@lucene.apache.org
Subject: usage of CollationAttributeFactory StandardTokenizer Analyzer

Hi,

I am trying to use CollationAttributeFactory with a custom analyzer. I am
using StandardTokenizer with CollationAttributeFactory as in
org.apache.lucene.collation.CollationKeyAnalyzer.

   protected TokenStreamComponents createComponents(String fieldName,
                                                    Reader reader) {
      final Tokenizer source = new StandardTokenizer(matchVersion,
attributeFactory, reader);
      TokenStream result = new StandardFilter(matchVersion, source);
      result = new TurkishLetterRemoverLowerCaseFilter(result);
      result = new StopFilter(matchVersion, result, stopwords);
      return new TokenStreamComponents(source, result);
   }


But I could not be successful. Can someone show me an example of
CollationAttributeFactory usage with a custom analyzer?

Mime
View raw message