@Override public IndexFieldData.Builder fielddataBuilder() { if (hasDocValues()) { return new DocValuesIndexFieldData.Builder(); } else if (fielddata) { return new PagedBytesIndexFieldData.Builder(TextFieldMapper.Defaults.FIELDDATA_MIN_FREQUENCY, TextFieldMapper.Defaults.FIELDDATA_MAX_FREQUENCY, TextFieldMapper.Defaults.FIELDDATA_MIN_SEGMENT_SIZE); } else { // means the index has a single type and the type field is implicit Function<MapperService, String> typeFunction = mapperService -> { Collection<String> types = mapperService.types(); if (types.size() > 1) { throw new AssertionError(); } // If we reach here, there is necessarily one type since we were able to find a `_type` field String type = types.iterator().next(); return type; }; return new ConstantIndexFieldData.Builder(typeFunction); } }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { if (hasDocValues()) { return new DocValuesIndexFieldData.Builder(); } else { // means the index has a single type and the type field is implicit Function<MapperService, String> typeFunction = mapperService -> { Collection<String> types = mapperService.types(); if (types.size() > 1) { throw new AssertionError(); } // If we reach here, there is necessarily one type since we were able to find a `_type` field String type = types.iterator().next(); return type; }; return new ConstantIndexFieldData.Builder(typeFunction); } }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { if (hasDocValues()) { return new DocValuesIndexFieldData.Builder(); } else { // means the index has a single type and the type field is implicit Function<MapperService, String> typeFunction = mapperService -> { Collection<String> types = mapperService.types(); if (types.size() > 1) { throw new AssertionError(); } // If we reach here, there is necessarily one type since we were able to find a `_type` field String type = types.iterator().next(); return type; }; return new ConstantIndexFieldData.Builder(typeFunction); } }
@Override public IndexFieldData.Builder fielddataBuilder() { if (hasDocValues()) { return new DocValuesIndexFieldData.Builder(); } else if (fielddata) { return new PagedBytesIndexFieldData.Builder(fielddataMinFrequency, fielddataMaxFrequency, fielddataMinSegmentSize); } else { throw new IllegalArgumentException("Fielddata is disabled on analyzed string fields by default. Set fielddata=true on [" + name() + "] in order to load fielddata in memory by uninverting the inverted index. Note that this can however " + "use significant memory."); } } }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder(); }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(NumericType.DATE); }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder(); }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder(); }
@Override public IndexFieldData.Builder fielddataBuilder() { return new DocValuesIndexFieldData.Builder(); } }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(type.numericType()); }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(NumericType.BOOLEAN); }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(NumericType.LONG); }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(type.numericType()); }
@Override public IndexFieldData.Builder fielddataBuilder() { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(NumericType.SHORT); } }
@Override public IndexFieldData.Builder fielddataBuilder() { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(NumericType.INT); } }
@Override public IndexFieldData.Builder fielddataBuilder() { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(NumericType.BYTE); } }
@Override public IndexFieldData.Builder fielddataBuilder() { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(NumericType.LONG); }
@Override public IndexFieldData.Builder fielddataBuilder() { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().numericType(NumericType.LONG); }
@Override public IndexFieldData.Builder fielddataBuilder() { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder().scriptFunction(IpScriptDocValues::new); }
@Override public IndexFieldData.Builder fielddataBuilder(String fullyQualifiedIndexName) { failIfNoDocValues(); return new DocValuesIndexFieldData.Builder(); }