lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: "Starts with" query?
Date Thu, 05 Jan 2006 22:33:39 GMT

: Think SQL of " ....where title like 'The quick%'  ".

I solved this problem by having a variation of my field that was not
tokenized, and did PrefixQueries on that field (so in your case, leave
your title field alone for generic matches, and have a titleUntokenized
field for PrefixMatches.

Another approach i have not tried that should work as long as your "starts
with" input is allways whole Terms (ie: "The quick %" and not "The qu%")
is to use a SpanFirstQuery wrapped arround a a SpanNearQuery containing
successive SpanTermQueries with no slop.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message