add comment about docvalue for date fields in getComputedFields (#25725)
This commit is contained in:
parent
708638899f
commit
0958e1d1d9
1 changed files with 4 additions and 2 deletions
|
@ -18,13 +18,15 @@
|
|||
*/
|
||||
|
||||
import _ from 'lodash';
|
||||
// Takes a hit, merges it with any stored/scripted fields, and with the metaFields
|
||||
// returns a flattened version
|
||||
|
||||
export function getComputedFields() {
|
||||
const self = this;
|
||||
const scriptFields = {};
|
||||
let docvalueFields = [];
|
||||
|
||||
// Date value returned in "_source" could be in any number of formats
|
||||
// Use a docvalue for each date field to ensure standardized formats when working with date fields
|
||||
// indexPattern.flattenHit will override "_source" values when the same field is also defined in "fields"
|
||||
docvalueFields = _.reject(self.fields.byType.date, 'scripted')
|
||||
.map((dateField) => {
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue