You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by asarkar <ab...@gmail.com> on 2013/08/19 20:05:09 UTC

Is using TokenStream in TextField constructor a way to chain Analyzers

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: http://lucene.472066.n3.nabble.com/Is-using-TokenStream-in-TextField-constructor-a-way-to-chain-Analyzers-tp4085520.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org