lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject How to do a "starts with" search
Date Mon, 20 Nov 2006 03:54:11 GMT
Hi,

I'm trying to replace an existing search mechanism that supports a 'starts with' 
type of searching, for example a mail subject can contain the string

A B C D

the existing search allows the user to search starts with 'A B*' which would 
match, whereas starts with 'B C*' would not.  PhraseQuery with no slop would 
would not work as it would match.

Is there any query I can enfore the starts with, so that 'B C*' does not match.

If not, do I have to use some HitsCollector to filter the results after the 
search - but then how do I find out the positional information.

Regards
Antony








---------------------------------------------------------------------
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