iprithv commented on code in PR #16218:
URL: https://github.com/apache/lucene/pull/16218#discussion_r3374856311
##########
lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextDocValuesWriter.java:
##########
@@ -477,11 +600,49 @@ public void addSortedSetField(FieldInfo field,
DocValuesProducer valuesProducer)
int docCount = 0;
int maxValueCount = 0;
+ List<SkipInterval> skipIntervals = new ArrayList<>();
+ int intervalDocCount = 0;
+ int intervalMinDocID = -1;
+ int intervalMaxDocID = -1;
+ long intervalMinValue = Long.MAX_VALUE;
+ long intervalMaxValue = Long.MIN_VALUE;
SortedSetDocValues values = valuesProducer.getSortedSet(field);
for (int doc = values.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; doc
= values.nextDoc()) {
++docCount;
maxValueCount = Math.max(maxValueCount, values.docValueCount());
+ if (intervalDocCount == 0) {
+ intervalMinDocID = doc;
+ }
+ intervalMaxDocID = doc;
+ for (int i = 0; i < values.docValueCount(); i++) {
Review Comment:
Nit: values.docValueCount() is called twice per doc here, once for
maxValueCount and again in the loop condition. addSortedNumericField just above
stashes it in a local valueCount, might be worth doing the same here for
consistency.
--
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]