Hello, --- Doug Cutting <[EMAIL PROTECTED]> wrote: > +1 > > I like this approach of modifying the query parser through > subclassing. > > We should consider taking this approach further, e.g., perhaps by > making > addClause(), getFieldQuery() and getRangeQuery() into protected > methods, > so that folks can modify their behavior too. Thoughts?
I don't see a problem with that. +1. > Also, I think we should lowercase prefix and wildcard queries by > default. This would fix one of the most frequently reported > problems. > Yes, it might also break folks who currently do case-sensitive > wildcard > queries, but I suspect they are far fewer than those who will > continue > to complain about the default case-sensitivity of wildcard searches. > What do others think? I'm pro lowercase! :) Tatu, are you okay with that? Otis > Tatu Saloranta wrote: > > (since this is the first patch I've done to Lucene, let me know if > there are > > some preferences or if I missed something...) > > > > I did some small refactorization to QueryParser.jj, to make it > easier to > > create subclasses that override actual query building (without > modifying > > actual parser part). I'll probably try to create my own > MultiFieldQueryParser > > with some changes (different weights for different fields, not > necessarily > > duplicating the whole query etc.), and these changes should make it > possible > > to do that without touching QueryParser.jj itself. > > > > I also added simple improvement to prefix/wildcard query handling; > now it is > > possible to set a property to enable automatic lowercasing of > prefix/wildcard > > terms (default is false to stay backwards compatible). This is not > a complete > > solution to wildcard query problems, but should help a bit. > > > > I ran unit tests (without errors), but I wasn't sure if there are > unit tests > > for QueryParser. Hopefully I didn't break anything; changes are > fairly minor. > > > > Let me know if proposed changes make sense, > > > > -+ Tatu +- __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
