I'm looking into some of the issues with LUCENE-557 and it seems that a
lot of them are triggered by the way BooleanWeight.normalize is
implimented...

    public void normalize(float norm) {
      norm *= getBoost();                         // incorporate boost
      for (int i = 0 ; i < weights.size(); i++) {
        BooleanClause c = (BooleanClause)clauses.elementAt(i);
        Weight w = (Weight)weights.elementAt(i);
        if (!c.isProhibited())
          w.normalize(norm);
      }
    }

...since prohibited clauses aren't normalized, they sub-weights don't get
their weights set properly, which means that when the Explanation is
claculated, they tend to result in an Explanation with a value of "0" ...
and since they are prohibited, the Explanation for BooleanQuery thinks
that is a good thing.

Does anyone know why normalize ignores the prohibited clauses?  was that
just intended to be an optimization (save time calculating stuff for
clauses we don't care about scoring in depth) ... ?



-Hoss


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

Reply via email to