lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Halbert <>
Subject Re: analysis filter wrapper
Date Thu, 14 May 2009 11:22:53 GMT
You can use your Analyzer to get a token stream from any text you give
it, just like Lucene does.

Something like:

String text = "your list of words to analyze and tokenize";

TokenStream ts = YOUR_ANALYZER.tokenStream(null, new
Token token = new Token();

while(( != null) {
	String t = new String(token.termBuffer()).substring(0,
	System.out.println("Got token " + t);

-----Original Message-----
From: Marek Rei <>
Subject: analysis filter wrapper
Date: Thu, 14 May 2009 11:57:57 +0100


I'm rather new to Lucene and could use some help.

My Analyzer uses a set of filters (PorterStemFilter, LowerCaseFilter,
WhitespaceTokenizer). I need to replicate the effect of these filters
outside of the normal Lucene pipeline. Basically I would like to input a
String from one end and get a processed String or String[] from the
other end.

Is there a good way to do this? I'm trying to figure it out myself but
in case I fail, maybe someone from here could give some advice?

Thank You!

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message