Get API: When _source is disabled, the source is still used if fetched from the transaction log, closes #1927.
This commit is contained in:
parent
ddecd723a7
commit
11064df6aa
|
@ -299,9 +299,12 @@ public class ShardGetService extends AbstractIndexShardComponent {
|
|||
}
|
||||
|
||||
FieldMapper<?> x = docMapper.mappers().smartNameFieldMapper(field);
|
||||
value = searchLookup.source().extractValue(field);
|
||||
if (x != null && value instanceof String) {
|
||||
value = x.valueFromString((String) value);
|
||||
// only if the field is stored or source is enabled we should add it..
|
||||
if (docMapper.sourceMapper().enabled() || x == null || x.stored()) {
|
||||
value = searchLookup.source().extractValue(field);
|
||||
if (x != null && value instanceof String) {
|
||||
value = x.valueFromString((String) value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue