Closes #227 - Adding back in the flattenWith step for the _source

This commit is contained in:
Chris Cowan 2014-08-05 16:55:19 -07:00
parent 8796a11176
commit 9859acf2f9

View file

@ -259,6 +259,9 @@ define(function (require) {
// counts each time
if (sortFn && hit._formatted) return;
// Flatten the fields
hit._source = _.flattenWith('.', hit._source);
hit._formatted = _.mapValues(hit._source, function (value, name) {
// add up the counts for each field name
if (counts[name]) counts[name] = counts[name] + 1;