lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asarkar <>
Subject Is using TokenStream in TextField constructor a way to chain Analyzers
Date Mon, 19 Aug 2013 18:05:09 GMT
I'm new to Lucene and given myself an assignment to index and search the
local Maven repo. What I'm trying to do is my analyzer to get the groupId
and artifactId out of the POM files, as separate tokens, which are then
indexed as "groupAndArtifactId" field.
I realize that Lucene does not have a way to chain Analyzers; so I can't
take the TokenStreamComponents from my analyzer and then feed them in the
WhitespaceAnalyzer. However, I see that the TextField constructor does
accept a TokenStream. What if I configure a field level WhitespaceAnalyzer
on "groupAndArtifactId" field and also construct it by calling the
tokenStream() method of my analyzer? Will the output from my analyzer going
to be fed in the WhitespaceAnalyzer and tokenized by whitespace?

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message