Can you combine these two queries somehow so that they behave like a PhraseQuery?

I have a custom query parser which takes a phrase like "*at sat" and produces a BooleanQuery consisting of a WildcardQuery ('*at') and a TermQuery ('sat'). This works, but matches more widely than expected (by me).

e.g. "*at sat" will match any docs containing '*at' OR 'sat', whereas
"cat sat" will only match docs containing the exact phrase

I would like the latter behaviour if at all possible.

I have looked at SpanQuery, but I can't see how to use it in this case...

Any pointers happily received.

- Chris


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

Reply via email to