Re: advanced WildcardQuery

2008-07-16 Thread Karl Wettin
16 jul 2008 kl. 18.09 skrev legrand thomas: I'd like to search on long titles (tokenized and stored) using the WildcardQuery. Considering the following example: title="pretty car for sale" If I search for "pretty*", I get the document having this title. But it's not the case if I build a

Re: advanced WildcardQuery

2008-07-16 Thread Erick Erickson
Check query.toString(), but I think the problem is that Lucene is looking for a single term (word?) that starts with "pretty" and ends with "car". So this should match "prettynicecar" but not "pretty nice car" since the latter is split into separate tokens. If you're concerned only with whole-word

advanced WildcardQuery

2008-07-16 Thread legrand thomas
Dear all, I'd like to search on long titles (tokenized and stored) using the WildcardQuery. Considering the following example: title="pretty car for sale" If I search for "pretty*", I get the document having this title. But it's not the case if I build a WilcardQuery with the term "pretty*ca