From 9e624942d8b60a69f715c6e1117c9d886b622ae3 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Wed, 18 Jun 2014 02:01:12 +0200 Subject: [PATCH] Fielddata: Move `getTermsEnum` from `AtomicFieldData` to `BytesValues.WithOrdinals`. Similarly to `SortedSetDocValues.termsEnum()`. Relates to #6524 --- ...TermsEnum.java => BytesValuesWithOrdinalsTermsEnum.java} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename src/main/java/org/elasticsearch/index/fielddata/plain/{AtomicFieldDataWithOrdinalsTermsEnum.java => BytesValuesWithOrdinalsTermsEnum.java} (95%) diff --git a/src/main/java/org/elasticsearch/index/fielddata/plain/AtomicFieldDataWithOrdinalsTermsEnum.java b/src/main/java/org/elasticsearch/index/fielddata/plain/BytesValuesWithOrdinalsTermsEnum.java similarity index 95% rename from src/main/java/org/elasticsearch/index/fielddata/plain/AtomicFieldDataWithOrdinalsTermsEnum.java rename to src/main/java/org/elasticsearch/index/fielddata/plain/BytesValuesWithOrdinalsTermsEnum.java index 74aea58bc1e..efcbb24ae67 100644 --- a/src/main/java/org/elasticsearch/index/fielddata/plain/AtomicFieldDataWithOrdinalsTermsEnum.java +++ b/src/main/java/org/elasticsearch/index/fielddata/plain/BytesValuesWithOrdinalsTermsEnum.java @@ -34,7 +34,7 @@ import java.util.Comparator; * A general {@link org.apache.lucene.index.TermsEnum} to iterate over terms from a {@link AtomicFieldData.WithOrdinals} * instance. */ -public class AtomicFieldDataWithOrdinalsTermsEnum extends TermsEnum { +public class BytesValuesWithOrdinalsTermsEnum extends TermsEnum { private final BytesValues.WithOrdinals bytesValues; private final long maxOrd; @@ -42,8 +42,8 @@ public class AtomicFieldDataWithOrdinalsTermsEnum extends TermsEnum { private long currentOrd = BytesValues.WithOrdinals.MISSING_ORDINAL; private BytesRef currentTerm; - public AtomicFieldDataWithOrdinalsTermsEnum(AtomicFieldData.WithOrdinals afd) { - this.bytesValues = afd.getBytesValues(); + public BytesValuesWithOrdinalsTermsEnum(BytesValues.WithOrdinals bytesValues) { + this.bytesValues = bytesValues; this.maxOrd = bytesValues.getMaxOrd(); }