Fielddata: Move `getTermsEnum` from `AtomicFieldData` to `BytesValues.WithOrdinals`.

Similarly to `SortedSetDocValues.termsEnum()`.

Relates to #6524
This commit is contained in:
Adrien Grand 2014-06-18 02:01:12 +02:00
parent 9b02b5061b
commit 9e624942d8
1 changed files with 3 additions and 3 deletions

View File

@ -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();
}