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

Help on Similarity

2006-03-06 Thread Eugene
Hi, I tried implementing my own Similarity and setting it in IndexWriter.setSimilarity(new CosSimilarity()). But, there's something weird, it doesn't seem to call the methods in my Similarity. For example, when I set the idf to return 0.0f the Similarity still gives me a score > 0.0f. How

Help on Similarity class

2006-01-18 Thread Marco Dissel
Hello I'm using Lucene for searching in a CRM application. For example when searching for a company name i want to show similair company names: search for: "Microsoft International" would return (in this order): -microsoft international -microsoft benelux -microsoft Currently it would also return