Skip to content

Commit

Permalink
removed condition on the IP field type when retrieving doc values
Browse files Browse the repository at this point in the history
  • Loading branch information
scampi committed Dec 17, 2016
1 parent eb70e84 commit d19ba56
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 0 additions & 6 deletions src/ui/public/agg_types/__tests__/metrics/top_hit.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ describe('Top hit metric', function () {
expect(aggDsl.top_hits.docvalue_fields).to.eql([ 'bytes' ]);
});

it('should only request for the source if the field is an IP', function () {
init({ field: 'ip' });
expect(aggDsl.top_hits._source).to.be('ip');
expect(aggDsl.top_hits.docvalue_fields).to.be(undefined);
});

it('should only request for the source if the field does not have the doc_values property', function () {
init({ field: 'ssl' });
expect(aggDsl.top_hits._source).to.be('ssl');
Expand Down
4 changes: 1 addition & 3 deletions src/ui/public/agg_types/metrics/top_hit.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ export default function AggTypeMetricTopProvider(Private) {
}
};
} else {
// do not try to get the doc_values for IP fields, since it is
// an internal representataion of the IP and so of no use for display.
if (field.type !== 'ip' && field.doc_values) {
if (field.doc_values) {
output.params.docvalue_fields = [ field.name ];
}
output.params._source = field.name === '_source' ? true : field.name;
Expand Down

0 comments on commit d19ba56

Please sign in to comment.