You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/08/25 17:09:41 UTC

[GitHub] [lucene] rmuir commented on a change in pull request #260: LUCENE-9613, LUCENE-10067: Further specialize ordinals.

rmuir commented on a change in pull request #260:
URL: https://github.com/apache/lucene/pull/260#discussion_r695948921



##########
File path: lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90DocValuesProducer.java
##########
@@ -780,6 +780,104 @@ public SortedDocValues getSorted(FieldInfo field) throws IOException {
   }
 
   private SortedDocValues getSorted(SortedEntry entry) throws IOException {
+    // Specialize the common case for ordinals: single block of packed integers.
+    final NumericEntry ordsEntry = entry.ordsEntry;
+    if (ordsEntry.blockShift < 0 // single block
+        && ordsEntry.bitsPerValue > 0) { // more than 1 value
+
+      if (ordsEntry.gcd != 1 || ordsEntry.minValue != 0 || ordsEntry.table != null) {
+        throw new IllegalStateException("Ordinals shouldn't use GCD, offset or table compression");
+      }

Review comment:
       +1 for having this sanity check




-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org