lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Hendrey" <ghend...@decarta.com>
Subject advice on DoubleMetaphoneSearching
Date Thu, 18 Dec 2008 03:56:52 GMT
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
 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message