lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armbrust, Daniel C." <>
Subject Analyzer use at search time?
Date Tue, 29 Apr 2003 21:49:06 GMT
I've written an analyzer which uses a filter which I wrote which invokes LVG's (
norm function on each token, and then, if there is more than one result for the token, it
puts all of the results into the same position as the original term (via setPositionIncrement(0)).
 This works great while indexing documents.

When my filter is run, LVG's norm turns the word "leaves" into "leaf" and "leave".  My filter
returns 3 tokens - leaves (position increment 1) leaf (0) and leave(0).

Now, when I search, if I provide the same LVG enabled analyzer, when I search for the word
"leaves" I get 0 hits.  I can see that it calls the norm function, and this returns the same
three words again as I would expect it to.  But I get 0 hits, even though all 3 words are
in the index.

If I search with an analyzer that does not have LVG in its flow, I get the correct hits each
of these searches - 


So, is there a bug in the way that analyzers are used during a search - in that it does not
expect the analyzer to return more than one word in a single spot - or am I misusing lucene?



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

View raw message