Erik Hatcher sagte: > On Jan 12, 2004, at 8:21 AM, Thomas Scheffler wrote: >> OK, I've looked inside QueryParser and it's seems to be the right >> place to >> do that. But it's rather complicated to transform a query to another, >> since QueryParserTokenManager as an extreme example is not quite >> understandable and needs a huge time for all that stuff to work in. > > Keep in mind that QueryParser is reasonably overridable. Simply > subclass it and override one of the get*Query methods. This may be the > simplest way for you to inject additional clauses into a query.
You're right if the source query consist of a non atomic query. If it's a combined one it does allready function quite well. Because of the last check in Query(String) of QueryParser it returns firstQuery then and getBooleanQuery is never called. As I'm not able to overwrite Query(String) I'm not quite sure how to handle searches like: foo. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
