Re: Help on Similarity

2006-03-06 Thread Chris Hostetter
: 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 qu

Re: Help on Similarity

2006-03-06 Thread Eugene
With respect to the earlier post there seems to be a bug in lucene 1.9.1 I tried using the similarity below and changed idf to: public float idf(int docFreq, int numDocs) { float f = (float)(Math.log((double)numDocs/(double)(docFreq+1) + 1.0)); return f; } Now, when I print the explana