Hello,
Quote:
I wasn't aware of the PerFieldAnalyzerWrapper, just expecting or hoping Hibernate Search would take care of this for me.
Yes it should care about this, if you can debug it you should receive a
org.hibernate.search.util.ScopedAnalyzer containing the mapping override for the specific fieldname.
Quote:
Can I get a reference to the analyzer object for it somewhere?
you can use analyzer names instead of class types:
Code:
getSearchFactory().getAnalyzer("phonetic")
Getting back to your first question:
Quote:
How can I make closer matches appear closer to the top of the search results?
what is your definition of "closer" ? It might well be possible that all is fine: the doublemetaphone does compute proximity basing on phonetic symbols, and the example you're using would indeed be encoded in very close forms: the
y to
i mismatch might be considered a more relevant change than the rest of letters. I'd suggest you to play with the Analyzer and see it's lowlevel output, you might want to use a different analyzer or ask to Lucene's experts.