ifx possible NPE when asking for _parent without parent mapping
This commit is contained in:
parent
63f2e84535
commit
ed99a51406
|
@ -250,7 +250,7 @@ public class ShardGetService extends AbstractIndexShardComponent {
|
|||
Object value = null;
|
||||
if (field.equals(RoutingFieldMapper.NAME) && docMapper.routingFieldMapper().stored()) {
|
||||
value = source.routing;
|
||||
} else if (field.equals(ParentFieldMapper.NAME) && docMapper.parentFieldMapper().stored()) {
|
||||
} else if (field.equals(ParentFieldMapper.NAME) && docMapper.parentFieldMapper() != null && docMapper.parentFieldMapper().stored()) {
|
||||
value = source.parent;
|
||||
} else if (field.equals(TimestampFieldMapper.NAME) && docMapper.timestampFieldMapper().stored()) {
|
||||
value = source.timestamp;
|
||||
|
|
Loading…
Reference in New Issue