lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konrad Scherer <bcdh...@uottawa.ca>
Subject New PhrasePrefixQuery.java
Date Mon, 18 Nov 2002 19:43:24 GMT
Hello,

I have modified QueryParser.jj and PhrasePrefixQuery.java to allow wildcard 
searches within phrases. This turned out to be a very involved change going 
through a few revisions. I have tried to make the changes as clean as 
possible. Some points
1) I created a WildcardTerm class which extends Term. Originally Term was 
final. My changes shouldn't affect anyone unless there is a reason Term 
must remain final which I have not noticed.
2) PhrasePrefixQuery.java has been completely rewritten. Extending Term 
helped simplify this class considerably. A PhrasePrefixQuery is now a 
vector of Terms (or WildcardTerms). The wildcard Terms are expanded though 
the prepare() call from Query.
3) I have added a function compareTermAt() which should help all those 
highlighting results.

My team rated this functionality as a high priority. I hope it is useful to 
someone else as well. Please let me know what you think.

Konrad Scherer
Mime
View raw message