@Override public SortedSetDocValues ordinalsValues(LeafReaderContext context) { final AtomicOrdinalsFieldData atomicFieldData = indexFieldData.load(context); return atomicFieldData.getOrdinalsValues(); }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) { return indexFieldData.load(context).getBytesValues(); } }
@Override public SortedNumericDoubleValues doubleValues(LeafReaderContext context) { return indexFieldData.load(context).getDoubleValues(); } }
@Override public SortedNumericDocValues longValues(LeafReaderContext context) { return indexFieldData.load(context).getLongValues(); }
@Override public final ScriptDocValues<?> getScriptValues() { switch (numericType) { case DATE: return new ScriptDocValues.Dates(getLongValues()); case BOOLEAN: return new ScriptDocValues.Booleans(getLongValues()); default: return new ScriptDocValues.Longs(getLongValues()); } }
/** * Wrap the provided {@link SortedNumericDocValues} instance to cast all values to doubles. */ public static SortedNumericDoubleValues castToDouble(final SortedNumericDocValues values) { final NumericDocValues singleton = DocValues.unwrapSingleton(values); if (singleton != null) { return singleton(new DoubleCastedValues(singleton)); } else { return new SortedDoubleCastedValues(values); } }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) { return indexFieldData.load(context).getBytesValues(); }
/** * Wrap the provided {@link SortedNumericDoubleValues} instance to cast all values to longs. */ public static SortedNumericDocValues castToLong(final SortedNumericDoubleValues values) { final NumericDoubleValues singleton = unwrapSingleton(values); if (singleton != null) { return DocValues.singleton(new LongCastedValues(singleton)); } else { return new SortedLongCastedValues(values); } }
@Override public AtomicFieldData load(LeafReaderContext context) { return new UidAtomicFieldData(prefix, idFieldData.load(context)); }
public org.elasticsearch.index.fielddata.MultiGeoPointValues geoPointValues(LeafReaderContext context) { return indexFieldData.load(context).getGeoPointValues(); } }
@Override public boolean isFloatingPoint() { return indexFieldData.getNumericType().isFloatingPoint(); }
@Override public void setNextDocId(int docId) throws IOException { if (in.advanceExact(docId)) { resize(in.docValueCount()); for (int i = 0; i < count; i++) { values[i] = in.nextValue(); } } else { resize(0); } }
/** * Return a {@link SortedNumericDoubleValues} that doesn't contain any value. */ public static MultiGeoPointValues emptyMultiGeoPoints() { return singleton(emptyGeoPoint()); }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) { return indexFieldData.load(context).getBytesValues(); }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) { final AtomicOrdinalsFieldData atomicFieldData = indexFieldData.load(context); return atomicFieldData.getBytesValues(); }
@Override public AtomicFieldData loadDirect(LeafReaderContext context) throws Exception { return new UidAtomicFieldData(prefix, idFieldData.loadDirect(context)); }
public static void toProtobuf(NodeStats stats, ProtobufSystemInfo.Section.Builder protobuf) { setAttribute(protobuf, "CPU Usage (%)", stats.getProcess().getCpu().getPercent()); setAttribute(protobuf, "Disk Available", byteCountToDisplaySize(stats.getFs().getTotal().getAvailable().getBytes())); setAttribute(protobuf, "Store Size", byteCountToDisplaySize(stats.getIndices().getStore().getSizeInBytes())); setAttribute(protobuf, "Open File Descriptors", stats.getProcess().getOpenFileDescriptors()); setAttribute(protobuf, "Max File Descriptors", stats.getProcess().getMaxFileDescriptors()); setAttribute(protobuf, "Spinning", stats.getFs().getTotal().getSpins()); setAttribute(protobuf, "JVM Heap Usage", formatPercent(stats.getJvm().getMem().getHeapUsedPercent())); setAttribute(protobuf, "JVM Heap Used", byteCountToDisplaySize(stats.getJvm().getMem().getHeapUsed().getBytes())); setAttribute(protobuf, "JVM Heap Max", byteCountToDisplaySize(stats.getJvm().getMem().getHeapMax().getBytes())); setAttribute(protobuf, "JVM Non Heap Used", byteCountToDisplaySize(stats.getJvm().getMem().getNonHeapUsed().getBytes())); setAttribute(protobuf, "JVM Threads", stats.getJvm().getThreads().getCount()); setAttribute(protobuf, "Field Data Memory", byteCountToDisplaySize(stats.getIndices().getFieldData().getMemorySizeInBytes())); setAttribute(protobuf, "Field Data Circuit Breaker Limit", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getLimit())); setAttribute(protobuf, "Field Data Circuit Breaker Estimation", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getEstimated())); setAttribute(protobuf, "Request Circuit Breaker Limit", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.REQUEST).getLimit())); setAttribute(protobuf, "Request Circuit Breaker Estimation", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.REQUEST).getEstimated())); setAttribute(protobuf, "Query Cache Memory", byteCountToDisplaySize(stats.getIndices().getQueryCache().getMemorySizeInBytes())); setAttribute(protobuf, "Request Cache Memory", byteCountToDisplaySize(stats.getIndices().getRequestCache().getMemorySizeInBytes())); }
@Override public ScriptDocValues<?> getScriptValues() { return new ScriptDocValues.Strings(getBytesValues()); }
/** * Returns field values for use by returned hits. */ default ScriptDocValues<?> getLegacyFieldValues() { return getScriptValues(); }
protected SortedBinaryDocValues getValues(LeafReaderContext context) throws IOException { return indexFieldData.load(context).getBytesValues(); }