When _source is disabled, don't return it in realtime get fetching the document from the transaction log, closes #1509.
This commit is contained in:
parent
e9fe8ec469
commit
b2fa6b7a94
|
@ -324,6 +324,11 @@ public class ShardGetService extends AbstractIndexShardComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if source is not enabled, don't return it even though we have it from the translog
|
||||||
|
if (sourceRequested && !docMapper.sourceMapper().enabled()) {
|
||||||
|
sourceRequested = false;
|
||||||
|
}
|
||||||
|
|
||||||
return new GetResult(shardId.index().name(), type, id, get.version(), get.exists(), sourceRequested ? source.source : null, fields);
|
return new GetResult(shardId.index().name(), type, id, get.version(), get.exists(), sourceRequested ? source.source : null, fields);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue