[ https://issues.apache.org/jira/browse/LUCENE-9536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17229052#comment-17229052 ]
ASF subversion and git services commented on LUCENE-9536: --------------------------------------------------------- Commit 849a28e539bb1a33074d1bda32685c3ad67fd374 in lucene-solr's branch refs/heads/master from Julie Tibshirani [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=849a28e ] LUCENE-9536: Correct the OrdinalMap optimization. (#2070) Previously we only checked that the first segment's ordinal deltas were all zero. This didn't account for some rare cases where the segment's ordinals matched the global ones, but it did not contain all terms. This can happen when using a FilteredTermsEnum, for example when merging a segment with deletions. > Optimize OrdinalMap when one segment contains all distinct values? > ------------------------------------------------------------------ > > Key: LUCENE-9536 > URL: https://issues.apache.org/jira/browse/LUCENE-9536 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Julie Tibshirani > Priority: Minor > Fix For: 8.8 > > Time Spent: 3h 40m > Remaining Estimate: 0h > > For doc values that are not too high cardinality, it seems common to have > some large segments that contain all distinct values (plus many small > segments who are missing some values). In this case, we could check if the > first segment ords map perfectly to global ords and if so store > `globalOrdDeltas` and `firstSegments` as `LongValues.ZEROES`. This could save > a small amount of space. > I don’t think it would help a huge amount, especially since the optimization > might only kick in with small/ medium cardinalities, which don’t create huge > `OrdinalMap` instances anyways? But it is simple and seemed worth mentioning. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org