lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message