From e15d2e2514f37acb36bc43064bc79bd672769ced Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 5 Jun 2014 16:55:21 +0200 Subject: [PATCH] Fielddata: EmptyOrdinals#getMaxOrd() should return 0 instead of 1, since ordinals are zero based since #5871. --- .../elasticsearch/index/fielddata/ordinals/EmptyOrdinals.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/elasticsearch/index/fielddata/ordinals/EmptyOrdinals.java b/src/main/java/org/elasticsearch/index/fielddata/ordinals/EmptyOrdinals.java index 7bd2feaf860..b5e31a56fea 100644 --- a/src/main/java/org/elasticsearch/index/fielddata/ordinals/EmptyOrdinals.java +++ b/src/main/java/org/elasticsearch/index/fielddata/ordinals/EmptyOrdinals.java @@ -19,7 +19,6 @@ package org.elasticsearch.index.fielddata.ordinals; -import org.apache.lucene.util.LongsRef; import org.elasticsearch.ElasticsearchIllegalStateException; /** @@ -39,7 +38,7 @@ public enum EmptyOrdinals implements Ordinals { @Override public long getMaxOrd() { - return 1; + return 0; } @Override @@ -48,7 +47,6 @@ public enum EmptyOrdinals implements Ordinals { } public static class Docs extends Ordinals.AbstractDocs { - public static final LongsRef EMPTY_LONGS_REF = new LongsRef(); public Docs(EmptyOrdinals parent) { super(parent);