jtibshirani commented on code in PR #12148: URL: https://github.com/apache/lucene/pull/12148#discussion_r1106621137
########## lucene/core/src/java/org/apache/lucene/search/AbstractKnnVectorQuery.java: ########## @@ -302,9 +298,9 @@ public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float bo public Explanation explain(LeafReaderContext context, int doc) { int found = Arrays.binarySearch(docs, doc + context.docBase); if (found < 0) { - return Explanation.noMatch("not in top " + k); + return Explanation.noMatch("not in top docs"); } - return Explanation.match(scores[found] * boost, "within top " + k); + return Explanation.match(scores[found] * boost, "within top docs"); Review Comment: Thanks, I gave that a try. I like this compromise, but overall I think it'd be too complex/ confusing if DocAndScoreQuery tried to fully represent the parent kNN vector query (in its query name, explanations, toString, etc.). It's just one of the consequences of our rewrite-based approach, that the kNN query is transformed into a separate query type. -- 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