[elasticsearch] Allow nested fields for annotation source (#10936)

This commit is contained in:
Zachary Cava 2018-02-19 00:26:13 -08:00 committed by Torkel Ödegaard
parent 9c36ee22a8
commit 710bb70746

View File

@ -166,7 +166,7 @@ export class ElasticDatasource {
for (var i = 0; i < hits.length; i++) {
var source = hits[i]._source;
var time = source[timeField];
var time = getFieldFromSource(source, timeField);
if (typeof hits[i].fields !== 'undefined') {
var fields = hits[i].fields;
if (_.isString(fields[timeField]) || _.isNumber(fields[timeField])) {