kaivalnp commented on code in PR #16710:
URL: https://github.com/apache/lucene/pull/16710#discussion_r4156831273
##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/codecs/dedup/DedupMergeContext.java:
##########
@@ -134,12 +134,12 @@ void finish(
groupInfo.write(meta);
if (quantizer != null) {
+ // Flavors referenced by this group's fields, shared across both
quantized branches.
+ Set<DedupQuantizer.Flavor> flavors =
EnumSet.noneOf(DedupQuantizer.Flavor.class);
+ for (FieldData fieldData : entry.getValue()) {
+
flavors.add(DedupQuantizer.Flavor.of(fieldData.fieldInfo.getVectorSimilarityFunction()));
+ }
Review Comment:
No strong opinions, but I think we can live with the code duplication across
these two blocks for clarity, or maybe a private helper to build `flavors`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]