Hi,
 
I would like to have a Phrase Query in which the Terms are matched using
the DoubleMetaphone algorithm.I found this link:
http://www.tropo.com/techno/java/lucene/metaphone.html
 
Which describes a DoubleMetaphoneQuery, and indeed this query works
amazingly well for misspellings, but only for a single term. The
approach taken in DoubleMetaphoneQuery is to create a
DoubleMetaphoneTermEnum which uses the DoubleMetaphone algorithm in
termCompare.
 
Would a better approach to be to make "DoubleMetaphoneTerm extends
Term", and override compareTo? The reason this might be a better
approach is that all existing queries, specifically PhraseQuery would
"automagically" pickup DoubleMetaphone. 
 
Can an experienced Lucen hand tell me if this approach is viable?
 
 
-geoff
 

Reply via email to