rmuir commented on code in PR #14433: URL: https://github.com/apache/lucene/pull/14433#discussion_r2034196400
########## lucene/queries/src/java/org/apache/lucene/queries/function/IndexReaderFunctions.java: ########## @@ -301,6 +304,17 @@ public static DoubleValuesSource docCount(String field) { return new IndexReaderDoubleValuesSource(r -> r.getDocCount(field), "docCount(" + field + ")"); } + /** + * Creates a value source that returns a field's length measured in number of term positions. It + * comes from the "norm", and it's approximated, as determined by {@link + * Similarity#computeNorm(FieldInvertState)}. + * + * @see org.apache.lucene.index.LeafReader#getNormValues(String) + */ + public static LongValuesSource fieldLength(String field) { Review Comment: please rename this as there is nothing that requires the norm to be this. for example in some scoring methods it is the number of unique terms -- 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