On May 24, 2006, at 11:33 AM, Doug Cutting wrote:
Might it work to instead change Searcher.getSimilarity to take a Query or field parameter? Then one could add Searcher.setSimilarity (String field) method?
Searcher.getSimilarity() is documented as a public method, but maybe it's still OK to add Searcher.getSimilarity(String field) and change over the various Query subclasses to request it via a new Query.getSimilarity(Searcher searcher, String Field) method.
That would work for TermQuery and PhraseQuery, as they're both limited to a single field. Assessing whether it would work for BooleanQuery is confusing. Various clauses in BooleanQuery can have different fields. The main concern I have is that each subquery not have an incorrect Similarity instance imposed on it from above by the parent BooleanQuery.
Marvin Humphrey Rectangular Research http://www.rectangular.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]