lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: SweetSpotSimiliarity
Date Wed, 24 May 2006 19:42:38 GMT

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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message