On Nov 8, 2011, at 03:58 , Felipe Carvalho wrote: > One other question: I'm looking at Lucene 3.4 javadocs ( > http://lucene.apache.org/java/3_4_0/api/core/index.html) but I can't find > MetaphoneReplacementAnalyzer anywhere. Does any one know if this class has > been removed from lucene-core.
That class is in Lucene in Action's companion code, not Lucene itself. Download it from http://www.manning.com/lucene > My Lucene In Action edition is from 2004, so I'm guessing things kinda > changed since then. There's a second edition out now, well worth getting if I do say so myself :) (I've learned a lot from reading and re-reading it myself, to be honest - thanks MikeM!) >> Now suppose my document had a particular field I don't want to be >> metaphones one the search, for instance, "exactName". For example, suppose >> I want to look for all documents which contents phonetically match "kool >> kat" and exactName match "kat" but not "cat", generating an expression like >> this: "exactName:kat AND contents:kool kat". >> >> Is it possible to do this? If so, how would I do it? Can I use specific >> analyzers for each field? Yes, quite possible, including boosting on exact matches if you want. Use a BooleanQuery to wrap clauses parsed once with phonetic analysis, and once without, including fields at indexing time for both too of course. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org