lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Armbrust <daniel.armbrust.l...@gmail.com>
Subject Query Parser custom analyzer question
Date Mon, 22 Aug 2005 19:54:06 GMT
I have a custom Analyzer which performs normalization on all of the 
terms as they pass through.

It does normalization like the following:

trees -> tree

Sometimes my normalizer returns multiple words for a normalization - for 
example:

leaves -> leaf leave

The second and all subsequent terms have the position increment set to 0.

The problem I am having now is that the QueryParser seems to ignore the 
positionIncrement values. 

If I create a QueryParser with my normalizing analyzer, and ask it to 
parse the following (default field of 'body'):

'something about leaves' - the query it generates is:  'body:something 
body:about body:"leaf leave"'

which does not find results, due to the double quotes.

I would have expected: 'body:something body:about body:leaf body:leave'

Is there any way I can fix this?  It is a bug?  Or just a mis-use and/or 
unsupported use case of the Query Parser?

Thanks,

Dan

-- 
****************************
Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester
daniel.armbrust(at)mayo.edu
http://informatics.mayo.edu/


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


Mime
View raw message