lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Braun <mbr...@uni-hd.de>
Subject Re: How to do a "starts with" search
Date Mon, 20 Nov 2006 09:00:40 GMT
Hi Antony Bowesman schrieb:
> 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.

Please refer to  the answers to my question on this list:
http://www.nabble.com/forum/ViewPost.jtp?post=7337585&framed=y

Shortly spoken: SpanFirstQuery works like a charm :)

hth,
 martin


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