lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Help on Similarity
Date Mon, 06 Mar 2006 18:46:20 GMT

: I tried implementing my own Similarity and setting it in
: IndexWriter.setSimilarity(new CosSimilarity()).

that only changes the Similarity used by the IndexWriter when writing out
hte index files (which is really only used to get the lengthNorm)

if you wnat to change the Similarity used at query time, you need to use
Searcher.setSimilarity(Similarity).  or to change it globally for
everything, call Similiarity.setDefault(Similarity) before constructing
any Writers/Readers/Searchers.




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message