lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <>
Subject [PATCH] Refactoring QueryParser.jj, setLowercaseWildcardTerms()
Date Wed, 12 Feb 2003 04:46:29 GMT
(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 +-

View raw message