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 WilcardQuery with the term "pretty*car". I also want to get this document when searching for "pretty*sale*". How should I do ? Is it really possible ?

You are confusing terms with phrases. Wildcards works on term level and you try to use wildcards to indicate position increment in a phrase. I think you are looking for a sloppy PhraseQuery or SpanNearQuery.

It could be solved in a way similar as you propose it should work, for instance by not tokenizing the title and use a RegexQuery. This is however a rather expensive solution.


           karl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to