Yes, I agree. I just wanted to point out that the current Weight implementations need to be modified heavily to introduce the behaviour you describe above. For example, take a look at TermQuery.TermWeight.scorer(): [...] return new TermScorer(this, termDocs, getSimilarity(searcher), reader.norms(term.field()));
This typically results in a call to searcher.getSimilarity(). In the new context, the searcher would be a MultiSearcher, and to resolve that call at on of the RemoteSearchables, the method getSimilarity() would have to be called remotely on it.
I think this can be handled by:
a. declaring TermQuery.searcher transient -- this should never be needed remotely and we don't want to serialize it; and
b. adding a non-transient Similarity field to TermQuery.Weight. A Similarity instance should be efficient to serialize with each Weight. An instance of DefaultSimilarity has no non-static fields, and static fields are not serialized, so it's serialization mostly consists of just its class name. Also, serializing the Similarity is required for correct behaviour, since we need to run some Similarity methods locally (idf, queryNorm) and some remotely (tf, coord).
We should probably factor this behavior into a Weight base class, since every Weight implementation should do this the same way.
Does this make sense?
Doug
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]