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 Dan Armbrust <da...@gmail.com> on 2005/08/22 21:54:06 UTC

Query Parser custom analyzer question

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


Re: 1.9 official betas WAS: Query Parser custom analyzer question

Posted by Daniel Naber <lu...@danielnaber.de>.
On Monday 22 August 2005 22:46, Dan Armbrust wrote:

> Cool - is there a daily build somewhere, or do I have to roll my own?  I
> couldn't find a daily build or a 1.9 alpha, beta, etc. on the site.

You need to get it from SVN and then build it yourself.

> Any idea when 1.9 might be released, even as an alpha?

In my opinion the code is ready, it's just that someone needs to start with 
the release process (which is not as trivial as it may sound).

Regards
 Daniel

-- 
http://www.danielnaber.de

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


1.9 official betas WAS: Query Parser custom analyzer question

Posted by Dan Armbrust <da...@gmail.com>.
Daniel Naber wrote:

>Correct handling of multiple terms per position was only added to SVN, it's 
>not part of Lucene 1.4.3.
>
>Regards
> Daniel
>
Cool - is there a daily build somewhere, or do I have to roll my own?  I 
couldn't find a daily build or a 1.9 alpha, beta, etc. on the site.

Any idea when 1.9 might be released, even as an alpha?  The dates in the 
Lucene2Whiteboard on the wiki no longer look realistic (unless the 1.9 
release is going to happen at the same time as the 2.0 release - which I 
could understand, if the 2.0 will only differ by removing all of the 
depreciated methods.

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


Re: Query Parser custom analyzer question

Posted by Daniel Naber <lu...@danielnaber.de>.
On Monday 22 August 2005 21:54, Dan Armbrust wrote:

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

Correct handling of multiple terms per position was only added to SVN, it's 
not part of Lucene 1.4.3.

Regards
 Daniel

-- 
http://www.danielnaber.de

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