public Object getField(String fieldName, LeafReaderContext ctx) throws IOException { ValuesSource.Bytes value = values.get(fieldName); if (value == null) { throw new IllegalArgumentException("Could not find field name [" + fieldName + "] in multiValuesSource"); } return value.bytesValues(ctx); } }
public Object getField(String fieldName, LeafReaderContext ctx) throws IOException { ValuesSource.Bytes value = values.get(fieldName); if (value == null) { throw new IllegalArgumentException("Could not find field name [" + fieldName + "] in multiValuesSource"); } return value.bytesValues(ctx); } }
public Object getField(String fieldName, LeafReaderContext ctx) throws IOException { ValuesSource.Bytes value = values.get(fieldName); if (value == null) { throw new IllegalArgumentException("Could not find field name [" + fieldName + "] in multiValuesSource"); } return value.bytesValues(ctx); } }
@Override protected LeafBucketCollector getLeafCollector(LeafReaderContext ctx, LeafBucketCollector sub) throws IOException { if (valuesSource == null) { return LeafBucketCollector.NO_OP_COLLECTOR; } if (valuesSource instanceof ValuesSource.Bytes.WithOrdinals) { SortedSetDocValues values = ((ValuesSource.Bytes.WithOrdinals) valuesSource).ordinalsValues(ctx); return new SortedSetRangeLeafCollector(values, ranges, sub) { @Override protected void doCollect(LeafBucketCollector sub, int doc, long bucket) throws IOException { collectBucket(sub, doc, bucket); } }; } else { SortedBinaryDocValues values = valuesSource.bytesValues(ctx); return new SortedBinaryRangeLeafCollector(values, ranges, sub) { @Override protected void doCollect(LeafBucketCollector sub, int doc, long bucket) throws IOException { collectBucket(sub, doc, bucket); } }; } }
@Override protected LeafBucketCollector getLeafCollector(LeafReaderContext ctx, LeafBucketCollector sub) throws IOException { if (valuesSource == null) { return LeafBucketCollector.NO_OP_COLLECTOR; } if (valuesSource instanceof ValuesSource.Bytes.WithOrdinals) { SortedSetDocValues values = ((ValuesSource.Bytes.WithOrdinals) valuesSource).ordinalsValues(ctx); return new SortedSetRangeLeafCollector(values, ranges, sub) { @Override protected void doCollect(LeafBucketCollector sub, int doc, long bucket) throws IOException { collectBucket(sub, doc, bucket); } }; } else { SortedBinaryDocValues values = valuesSource.bytesValues(ctx); return new SortedBinaryRangeLeafCollector(values, ranges, sub) { @Override protected void doCollect(LeafBucketCollector sub, int doc, long bucket) throws IOException { collectBucket(sub, doc, bucket); } }; } }
@Override Collector getLeafCollector(LeafReaderContext context, Collector next) throws IOException { final SortedBinaryDocValues dvs = vs.bytesValues(context); return doc -> { if (dvs.advanceExact(doc)) { int num = dvs.docValueCount(); for (int i = 0; i < num; i++) { values[0] = dvs.nextValue(); next.collect(doc); } } }; } }
public Object getField(final int ordinal, LeafReaderContext ctx) throws IOException { return values[ordinal].bytesValues(ctx); } }
@Override public void setNextReader(AtomicReaderContext reader) { this.values = valuesSource.bytesValues(); }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { SortedBinaryDocValues values = valuesSource.bytesValues(context); return replaceMissing(values, missing); } };
public Object getField(final int ordinal, LeafReaderContext ctx) throws IOException { return values[ordinal].bytesValues(ctx); } }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { SortedBinaryDocValues values = valuesSource.bytesValues(context); return replaceMissing(values, missing); } };
@Override public DocValueBits docsWithValue(LeafReaderContext context) throws IOException { final SortedBinaryDocValues bytes = bytesValues(context); return org.elasticsearch.index.fielddata.FieldData.docsWithValue(bytes); }
@Override public Bits docsWithValue(LeafReaderContext context) throws IOException { final SortedBinaryDocValues bytes = bytesValues(context); if (org.elasticsearch.index.fielddata.FieldData.unwrapSingleton(bytes) != null) { return org.elasticsearch.index.fielddata.FieldData.unwrapSingletonBits(bytes); } else { return org.elasticsearch.index.fielddata.FieldData.docsWithValue(bytes, context.reader().maxDoc()); } }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { SortedBinaryDocValues values = valuesSource.bytesValues(context); return replaceMissing(values, missing); } };
@Override public DocValueBits docsWithValue(LeafReaderContext context) throws IOException { final SortedBinaryDocValues bytes = bytesValues(context); return org.elasticsearch.index.fielddata.FieldData.docsWithValue(bytes); }
@Override public Bits docsWithValue(LeafReaderContext context) throws IOException { final SortedBinaryDocValues bytes = bytesValues(context); if (org.elasticsearch.index.fielddata.FieldData.unwrapSingleton(bytes) != null) { return org.elasticsearch.index.fielddata.FieldData.unwrapSingletonBits(bytes); } else { return org.elasticsearch.index.fielddata.FieldData.docsWithValue(bytes, context.reader().maxDoc()); } }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { SortedBinaryDocValues values = valuesSource.bytesValues(context); return replaceMissing(values, missing); } };
@Override protected LeafBucketCollector getLeafCollector(LeafReaderContext ctx, LeafBucketCollector sub) throws IOException { if (valuesSource == null) { return LeafBucketCollector.NO_OP_COLLECTOR; } if (valuesSource instanceof ValuesSource.Bytes.WithOrdinals) { SortedSetDocValues values = ((ValuesSource.Bytes.WithOrdinals) valuesSource).ordinalsValues(ctx); return new SortedSetRangeLeafCollector(values, ranges, sub) { @Override protected void doCollect(LeafBucketCollector sub, int doc, long bucket) throws IOException { collectBucket(sub, doc, bucket); } }; } else { SortedBinaryDocValues values = valuesSource.bytesValues(ctx); return new SortedBinaryRangeLeafCollector(values, ranges, sub) { @Override protected void doCollect(LeafBucketCollector sub, int doc, long bucket) throws IOException { collectBucket(sub, doc, bucket); } }; } }
@Override public DocValueBits docsWithValue(LeafReaderContext context) throws IOException { final SortedBinaryDocValues bytes = bytesValues(context); return org.elasticsearch.index.fielddata.FieldData.docsWithValue(bytes); }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { SortedBinaryDocValues values = valuesSource.bytesValues(context); return replaceMissing(values, missing); } };