Remove AtomicFieldData.isValuesOrdered.

This method is not used anymore.

Close #5688
This commit is contained in:
Adrien Grand 2014-04-04 15:46:25 +02:00
parent 866c520abb
commit 9df655adb2
17 changed files with 4 additions and 163 deletions

View File

@ -31,11 +31,6 @@ public abstract class AbstractAtomicNumericFieldData implements AtomicNumericFie
this.isFloat = isFloat; this.isFloat = isFloat;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public ScriptDocValues getScriptValues() { public ScriptDocValues getScriptValues() {
if (isFloat) { if (isFloat) {

View File

@ -33,11 +33,6 @@ public interface AtomicFieldData<Script extends ScriptDocValues> extends RamUsag
*/ */
boolean isMultiValued(); boolean isMultiValued();
/**
* Are the values ordered? (in ascending manner).
*/
boolean isValuesOrdered();
/** /**
* The number of docs in this field data. * The number of docs in this field data.
*/ */

View File

@ -29,11 +29,10 @@ import org.elasticsearch.index.AbstractIndexComponent;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;
import org.elasticsearch.index.fielddata.*; import org.elasticsearch.index.fielddata.*;
import org.elasticsearch.index.fielddata.fieldcomparator.SortMode; import org.elasticsearch.index.fielddata.fieldcomparator.SortMode;
import org.elasticsearch.index.fielddata.ordinals.InternalGlobalOrdinalsBuilder.OrdinalMappingSource;
import org.elasticsearch.index.fielddata.plain.AtomicFieldDataWithOrdinalsTermsEnum; import org.elasticsearch.index.fielddata.plain.AtomicFieldDataWithOrdinalsTermsEnum;
import org.elasticsearch.index.mapper.FieldMapper; import org.elasticsearch.index.mapper.FieldMapper;
import static org.elasticsearch.index.fielddata.ordinals.InternalGlobalOrdinalsBuilder.OrdinalMappingSource;
/** /**
* {@link IndexFieldData} impl based on global ordinals. * {@link IndexFieldData} impl based on global ordinals.
*/ */
@ -162,11 +161,6 @@ public final class GlobalOrdinalsIndexFieldData extends AbstractIndexComponent i
return afd.isMultiValued(); return afd.isMultiValued();
} }
@Override
public boolean isValuesOrdered() {
return afd.isValuesOrdered();
}
@Override @Override
public int getNumDocs() { public int getNumDocs() {
return afd.getNumDocs(); return afd.getNumDocs();

View File

@ -49,11 +49,6 @@ abstract class AbstractGeoPointIndexFieldData extends AbstractIndexFieldData<Ato
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return 0; return 0;

View File

@ -47,11 +47,6 @@ public class BinaryDVAtomicFieldData implements AtomicFieldData<ScriptDocValues.
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return true; // single-valued
}
@Override @Override
public int getNumDocs() { public int getNumDocs() {
return reader.maxDoc(); return reader.maxDoc();

View File

@ -23,7 +23,9 @@ import org.apache.lucene.index.AtomicReader;
import org.apache.lucene.index.BinaryDocValues; import org.apache.lucene.index.BinaryDocValues;
import org.apache.lucene.store.ByteArrayDataInput; import org.apache.lucene.store.ByteArrayDataInput;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.elasticsearch.index.fielddata.*; import org.elasticsearch.index.fielddata.AtomicFieldData;
import org.elasticsearch.index.fielddata.BytesValues;
import org.elasticsearch.index.fielddata.ScriptDocValues;
final class BytesBinaryDVAtomicFieldData implements AtomicFieldData<ScriptDocValues> { final class BytesBinaryDVAtomicFieldData implements AtomicFieldData<ScriptDocValues> {
@ -41,11 +43,6 @@ final class BytesBinaryDVAtomicFieldData implements AtomicFieldData<ScriptDocVal
return true; return true;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public int getNumDocs() { public int getNumDocs() {
return reader.maxDoc(); return reader.maxDoc();

View File

@ -72,11 +72,6 @@ public abstract class DoubleArrayAtomicFieldData extends AbstractAtomicNumericFi
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return 0; return 0;
@ -114,11 +109,6 @@ public abstract class DoubleArrayAtomicFieldData extends AbstractAtomicNumericFi
return ordinals.isMultiValued(); return ordinals.isMultiValued();
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return ordinals.getNumOrds(); return ordinals.getNumOrds();
@ -199,11 +189,6 @@ public abstract class DoubleArrayAtomicFieldData extends AbstractAtomicNumericFi
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrds; return numOrds;
@ -297,11 +282,6 @@ public abstract class DoubleArrayAtomicFieldData extends AbstractAtomicNumericFi
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrds; return numOrds;

View File

@ -74,11 +74,6 @@ public class FSTBytesAtomicFieldData implements AtomicFieldData.WithOrdinals<Scr
return ordinals.getNumOrds(); return ordinals.getNumOrds();
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public long getMemorySizeInBytes() { public long getMemorySizeInBytes() {
if (size == -1) { if (size == -1) {
@ -199,11 +194,6 @@ public class FSTBytesAtomicFieldData implements AtomicFieldData.WithOrdinals<Scr
return ordinals.getNumDocs(); return ordinals.getNumDocs();
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public BytesValues.WithOrdinals getBytesValues(boolean needsHashes) { public BytesValues.WithOrdinals getBytesValues(boolean needsHashes) {
return new EmptyByteValuesWithOrdinals(ordinals.ordinals()); return new EmptyByteValuesWithOrdinals(ordinals.ordinals());

View File

@ -76,11 +76,6 @@ public abstract class FloatArrayAtomicFieldData extends AbstractAtomicNumericFie
return 0; return 0;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getMemorySizeInBytes() { public long getMemorySizeInBytes() {
return 0; return 0;
@ -113,11 +108,6 @@ public abstract class FloatArrayAtomicFieldData extends AbstractAtomicNumericFie
return ordinals.isMultiValued(); return ordinals.isMultiValued();
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return ordinals.getNumOrds(); return ordinals.getNumOrds();
@ -195,11 +185,6 @@ public abstract class FloatArrayAtomicFieldData extends AbstractAtomicNumericFie
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrd; return numOrd;
@ -295,11 +280,6 @@ public abstract class FloatArrayAtomicFieldData extends AbstractAtomicNumericFie
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrd; return numOrd;

View File

@ -44,11 +44,6 @@ final class GeoPointBinaryDVAtomicFieldData extends AtomicGeoPointFieldData<Scri
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public int getNumDocs() { public int getNumDocs() {
return reader.maxDoc(); return reader.maxDoc();

View File

@ -74,11 +74,6 @@ public abstract class GeoPointCompressedAtomicFieldData extends AtomicGeoPointFi
return ordinals.isMultiValued(); return ordinals.isMultiValued();
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return ordinals.getNumOrds(); return ordinals.getNumOrds();
@ -152,11 +147,6 @@ public abstract class GeoPointCompressedAtomicFieldData extends AtomicGeoPointFi
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrds; return numOrds;
@ -227,11 +217,6 @@ public abstract class GeoPointCompressedAtomicFieldData extends AtomicGeoPointFi
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrds; return numOrds;

View File

@ -70,11 +70,6 @@ public abstract class GeoPointDoubleArrayAtomicFieldData extends AtomicGeoPointF
return ordinals.isMultiValued(); return ordinals.isMultiValued();
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return ordinals.getNumOrds(); return ordinals.getNumOrds();
@ -144,11 +139,6 @@ public abstract class GeoPointDoubleArrayAtomicFieldData extends AtomicGeoPointF
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrds; return numOrds;
@ -216,11 +206,6 @@ public abstract class GeoPointDoubleArrayAtomicFieldData extends AtomicGeoPointF
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrds; return numOrds;

View File

@ -52,11 +52,6 @@ public class NumericDVAtomicFieldData extends AbstractAtomicNumericFieldData {
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return true; // single-valued
}
@Override @Override
public int getNumDocs() { public int getNumDocs() {
return reader.maxDoc(); return reader.maxDoc();

View File

@ -73,11 +73,6 @@ public abstract class PackedArrayAtomicFieldData extends AbstractAtomicNumericFi
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getMemorySizeInBytes() { public long getMemorySizeInBytes() {
return 0; return 0;
@ -115,11 +110,6 @@ public abstract class PackedArrayAtomicFieldData extends AbstractAtomicNumericFi
return ordinals.isMultiValued(); return ordinals.isMultiValued();
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public long getMemorySizeInBytes() { public long getMemorySizeInBytes() {
if (size == -1) { if (size == -1) {
@ -202,11 +192,6 @@ public abstract class PackedArrayAtomicFieldData extends AbstractAtomicNumericFi
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrds; return numOrds;
@ -306,11 +291,6 @@ public abstract class PackedArrayAtomicFieldData extends AbstractAtomicNumericFi
return false; return false;
} }
@Override
public boolean isValuesOrdered() {
return false;
}
@Override @Override
public long getNumberUniqueValues() { public long getNumberUniqueValues() {
return numOrds; return numOrds;

View File

@ -74,11 +74,6 @@ public class PagedBytesAtomicFieldData implements AtomicFieldData.WithOrdinals<S
return ordinals.getNumOrds(); return ordinals.getNumOrds();
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public long getMemorySizeInBytes() { public long getMemorySizeInBytes() {
if (size == -1) { if (size == -1) {
@ -209,11 +204,6 @@ public class PagedBytesAtomicFieldData implements AtomicFieldData.WithOrdinals<S
return 0; return 0;
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public BytesValues.WithOrdinals getBytesValues(boolean needsHashes) { public BytesValues.WithOrdinals getBytesValues(boolean needsHashes) {
return new EmptyByteValuesWithOrdinals(ordinals.ordinals()); return new EmptyByteValuesWithOrdinals(ordinals.ordinals());

View File

@ -55,11 +55,6 @@ public class ParentChildAtomicFieldData implements AtomicFieldData {
return true; return true;
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public int getNumDocs() { public int getNumDocs() {
return numDocs; return numDocs;

View File

@ -37,11 +37,6 @@ public final class SortedSetDVBytesAtomicFieldData extends SortedSetDVAtomicFiel
super(reader, field); super(reader, field);
} }
@Override
public boolean isValuesOrdered() {
return true;
}
@Override @Override
public Strings getScriptValues() { public Strings getScriptValues() {
return new ScriptDocValues.Strings(getBytesValues(false)); return new ScriptDocValues.Strings(getBytesValues(false));