DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31841>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31841

MultiSearcher problems with Similarity.docFreq()





------- Additional Comments From [EMAIL PROTECTED]  2004-11-12 09:55 -------
Here is another patch to correct the idf calculation. This patch currently is
kind of proof of concept (fixes Daniel Nabers test case), but not ready for
commitment, as it breaks ParallelMultiSearcher.java and several test cases. 

Instead of Chucks Williams patch, this one relies on a specialized Similarity
object which is passed to the searchers. This causes less changes (only
MultiSearcher is affected), and IMHO fits better into Lucene's design, because
Similarity is responsible for idf calculation anyway, but the Searchers aren't.

Problems:
- The Similarity object can't be passed to RemoteSearchables, so the patch works
only for Searchers.
- MultiSearcher.search() methods aren't thread-safe anymore. The only way to
provide the Searches with the new Similarity object is to use setSimilarity().
This causes *all* searches to use it, not only the search which is currently
running.

A better solution would be to add the Similarity object to the Query. While ther
e is already a similarity attribute in the Query, there is no Method to set it,
and also interaction with subqueries is unclear. Such a change would therefore
require a major redesign of similarity handling. If we make Similarity
serializable, then we could pass the object to RemoteSearchers too, as part of
the query. If I find time, I'll submit a complete patch in the future.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to