jtibshirani commented on a change in pull request #185: URL: https://github.com/apache/lucene/pull/185#discussion_r669839811
########## File path: lucene/sandbox/src/java/org/apache/lucene/sandbox/search/MultiNormsLeafSimScorer.java ########## @@ -62,6 +67,14 @@ weightList.add(field.weight); } } + + if (normsList.isEmpty() == false && normsList.size() != normFields.size()) { + throw new IllegalArgumentException( + getClass().getSimpleName() + + " requires norms to be consistent across fields: some fields cannot" + + " have norms enabled, while others have norms disabled"); Review comment: Doing more research, I don't think it's possible to detect if norms are disabled upfront: `LeafReader#getNormsValues` could be `null` if a field uses norms but happens to be missing from a segment. I opted to just document this requirement (as we do for the fact norms must be additive and encoded in a certain way). If the calling application has its own notion of schema, it can enforce the norms requirements upfront. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org