lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anders Nielsen" <and...@visator.dk>
Subject RE: PhrasePrefixQuery
Date Wed, 31 Oct 2001 23:07:18 GMT
that'd be very nice.

-----Original Message-----
From: Doug Cutting [mailto:DCutting@grandcentral.com]
Sent: 31. oktober 2001 23:37
To: 'Lucene Developers List'
Subject: RE: PhrasePrefixQuery


> From: Anders Nielsen [mailto:anders@visator.dk]
>
> I would like to be able to make a search that is like a
> phrase-query, except
> that the last term in the phrase can be a prefix.
>
> An example would be a search for
>
> this is a t*
>
> which would match the string "this is a test"
>
>
> And I was just wondering if anyone else have made a
> PhrasePrefixQuery Class,
> before I start making one myself.

I don't know of any effort to do this.

It would not be too difficult to add a method to PhraseQuery:
  public void add(Term[]);
If you added {"a","b"} and {"x","y"} to a PhraseQuery then it would match
any of "a x", "a y", "b x" and "b y", and much more efficiently than a query
containing these four phrase queries.  It would only traverse the
TermPositions for each term once, while the four-phrase version would
traverse each four times.

If that sounds useful, I can add it to my list of tasks...

Doug

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



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


Mime
View raw message