lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seneviratne_Yas...@emc.com
Subject does the MultiSearcher class calculate IDF properly?
Date Thu, 06 Dec 2007 02:05:09 GMT
I tried the following.  Creating 2 different indexes, search each
individually and print score details and compare to searching both
indexes with MulitSearcher and printing score details.  

The "docFreq" value printed don't seem right - is this just a problem
with using Explain together with the MultiSearcher?


Code is like:
MultiSearcher multi = new MultiSearcher(searchables);
Hits hits = multi.search(query);
for(int i=0; i<hits.length(); i++)
{
  Explanation expl = multi.explain(query, hits.id(i));
  System.out.println(expl.toString());
}


Output:
id = 14 score = 0.071
0.07073946 = (MATCH) fieldWeight(contents:climate in 2), product of:
  1.0 = tf(termFreq(contents:climate)=1)
  1.8109303 = idf(docFreq=1)
  0.0390625 = fieldNorm(field=contents, doc=2)

---------------------------------------------------------------------
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