You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Konrad Scherer <bc...@uottawa.ca> on 2002/11/27 21:14:56 UTC

New PhrasePrefixQuery

Hello all,

First my thanks to Doug and Anders for their patience and help.
Notes about this new version
1) No changes to Term. There are now inner classes to handle the Term 
versus WildcardTerm stuff.
2) If analyzer does not drop wildcard characters (like StandardTokenizer) 
then this class could be a drop in replacement for PhraseQuery.
3) This class does more than prefix terms, it handles both ? and * in any 
location thanks to WildcardTermEnum. Perhaps it should be called 
PhraseWildcardQuery?
4) In an attempt to get around using the prepare method I have combined 
sumOfSquaredWeights and normalize into the scorer method. I have to cache 
the searcher from sumOfSquaredWeights. The method works i.e. produces the 
correct results, but I do not know it the math is okay.
Tell me what you think.

Konrad

Re: New PhrasePrefixQuery

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello Konrad,

What was the reason for this change?  The need to support wildcard
queries, and not just prefix questies inside phrase queries?
e.g.
  "How do you spell mi*pelling"
or
  "How do you spell mis?pelling"
and not just
  "How do you spell Missis*"

There are no other functionality changes, right?
Just trying to understand.
If that is so, then yes, a better class name would be
PhraseWildcardQuery, and the current PhrasePrefixQuery should be
deprecated.

I think this would be a good addition.

Also, why the ArrayList -> Vector change of the existing code?

Thanks,
Otis

--- Konrad Scherer <bc...@uottawa.ca> wrote:
> Hello all,
> 
> First my thanks to Doug and Anders for their patience and help.
> Notes about this new version
> 1) No changes to Term. There are now inner classes to handle the Term
> 
> versus WildcardTerm stuff.
> 2) If analyzer does not drop wildcard characters (like
> StandardTokenizer) 
> then this class could be a drop in replacement for PhraseQuery.
> 3) This class does more than prefix terms, it handles both ? and * in
> any 
> location thanks to WildcardTermEnum. Perhaps it should be called 
> PhraseWildcardQuery?
> 4) In an attempt to get around using the prepare method I have
> combined 
> sumOfSquaredWeights and normalize into the scorer method. I have to
> cache 
> the searcher from sumOfSquaredWeights. The method works i.e. produces
> the 
> correct results, but I do not know it the math is okay.
> Tell me what you think.
> 
> Konrad

> ATTACHMENT part 2 application/octet-stream name=QueryParser.jj.diff;
x-mac-type=42494E41; x-mac-creator=5843454C


> ATTACHMENT part 3 application/octet-stream
name=PhrasePrefixQuery.java



__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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