lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <>
Subject Re: "Starts with" query?
Date Thu, 05 Jan 2006 22:48:42 GMT

On 06/01/2006, at 9:33 AM, Chris Hostetter wrote:

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

Thanks Chris, I had thought of that one, but unfortunately the title  
could be quite long, and there are literally millions of documents.   
Isn't each title going to be included as one "term" in the index  
dictionary?  If so, won't the index get ridiculously large and slow?
> 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.

ooh err, Span queries, I'd better go have a look at them.



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

View raw message