On Friday 20 May 2005 11:30, Stanislav Jordanov wrote: > Is there a Lucene Query (or something that will do a job) like: > "Star Wars tri*" > > that will match all docs containing a 3 word phrase: 'Star' followed by > 'Wars' followed by a word starting with 'tri'. > > I.e. the above query will match both "Star Wars trilogy" and "Star Wars > triumph".
You'll need an ordered SpanNearQuery over the following: - SpanTermQuery for "Star" - SpanTermQuery for "Wars" - SpanOrQuery over all SpanTermQuery's for terms matching tri*. The last one should be a SpanPrefixQuery, but that one is not available. Have a look in PrefixQuery.rewrite() on how to find all terms matching tri*, it's fairly straightforward. Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]