@arranger/middleware
Advanced tools
Comparing version 2.16.1 to 2.16.2
@@ -43,7 +43,8 @@ "use strict"; | ||
var createTermAggregation = function createTermAggregation(_ref3) { | ||
var _graphqlField$buckets, _graphqlField$buckets2, _topHits$__arguments$, _topHits$__arguments$2, _ref4; | ||
var _graphqlField$buckets, _graphqlField$buckets2, _topHits$__arguments$, _topHits$__arguments$2, _aggs; | ||
var field = _ref3.field, | ||
isNested = _ref3.isNested, | ||
graphqlField = _ref3.graphqlField; | ||
graphqlField = _ref3.graphqlField, | ||
termFilters = _ref3.termFilters; | ||
var maxAggregations = (0, _lodash.get)(graphqlField, ['buckets', '__arguments', 0, 'max', 'value'], MAX_AGGREGATION_SIZE); | ||
@@ -94,3 +95,3 @@ var termFilter = (graphqlField === null || graphqlField === void 0 ? void 0 : (_graphqlField$buckets = graphqlField.buckets) === null || _graphqlField$buckets === void 0 ? void 0 : _graphqlField$buckets.filter_by_term) || null; | ||
return _ref4 = {}, _defineProperty(_ref4, field, _objectSpread(_objectSpread({}, !(0, _isEmpty["default"])(innerAggs) ? { | ||
var aggs = (_aggs = {}, _defineProperty(_aggs, field, _objectSpread(_objectSpread({}, !(0, _isEmpty["default"])(innerAggs) ? { | ||
aggs: _objectSpread({}, innerAggs) | ||
@@ -102,3 +103,3 @@ } : {}), {}, { | ||
} | ||
})), _defineProperty(_ref4, "".concat(field, ":missing"), _objectSpread(_objectSpread({}, isNested ? { | ||
})), _defineProperty(_aggs, "".concat(field, ":missing"), _objectSpread(_objectSpread({}, isNested ? { | ||
aggs: { | ||
@@ -113,5 +114,17 @@ rn: { | ||
} | ||
})), _ref4; | ||
})), _aggs); | ||
return isNested && termFilters.length > 0 ? wrapNestedFilter(aggs, field, termFilters) : aggs; | ||
}; | ||
var wrapNestedFilter = function wrapNestedFilter(aggs, field, termFilters) { | ||
return _defineProperty({}, "".concat(field, ":nested_filtered"), { | ||
filter: { | ||
bool: { | ||
must: termFilters | ||
} | ||
}, | ||
aggs: aggs | ||
}); | ||
}; | ||
var getPrecisionThreshold = function getPrecisionThreshold(graphqlField) { | ||
@@ -144,3 +157,5 @@ var _args$precision_thres; | ||
_ref7$isNested = _ref7.isNested, | ||
isNested = _ref7$isNested === void 0 ? false : _ref7$isNested; | ||
isNested = _ref7$isNested === void 0 ? false : _ref7$isNested, | ||
_ref7$termFilters = _ref7.termFilters, | ||
termFilters = _ref7$termFilters === void 0 ? [] : _ref7$termFilters; | ||
var types = [_constants.BUCKETS, _constants.STATS, _constants.HISTOGRAM, _constants.BUCKET_COUNT, _constants.CARDINALITY, _constants.TOPHITS].filter(function (t) { | ||
@@ -154,3 +169,4 @@ return graphqlField[t]; | ||
isNested: isNested, | ||
graphqlField: graphqlField | ||
graphqlField: graphqlField, | ||
termFilters: termFilters | ||
})); | ||
@@ -176,2 +192,2 @@ } else if ([_constants.STATS, _constants.HISTOGRAM].includes(type)) { | ||
exports["default"] = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9jcmVhdGVGaWVsZEFnZ3JlZ2F0aW9uLmpzIl0sIm5hbWVzIjpbIk1BWF9BR0dSRUdBVElPTl9TSVpFIiwiSElTVE9HUkFNX0lOVEVSVkFMX0RFRkFVTFQiLCJDQVJESU5BTElUWV9ERUZBVUxUX1BSRUNJU0lPTl9USFJFU0hPTEQiLCJjcmVhdGVOdW1lcmljQWdncmVnYXRpb24iLCJ0eXBlIiwiZmllbGQiLCJncmFwaHFsRmllbGQiLCJhcmdzIiwiSElTVE9HUkFNIiwiaW50ZXJ2YWwiLCJjcmVhdGVUZXJtQWdncmVnYXRpb24iLCJpc05lc3RlZCIsIm1heEFnZ3JlZ2F0aW9ucyIsInRlcm1GaWx0ZXIiLCJidWNrZXRzIiwiZmlsdGVyX2J5X3Rlcm0iLCJ0b3BIaXRzIiwidG9wX2hpdHMiLCJzb3VyY2UiLCJfX2FyZ3V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RVRfQ09VTlQpIHtcbiAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKFxuICAgICAgICBhY2MsXG4gICAgICAgIGNyZWF0ZVRlcm1BZ2dyZWdhdGlvbih7IGZpZWxkLCBpc05lc3RlZCwgZ3JhcGhxbEZpZWxkLCB0ZXJtRmlsdGVycyB9KSxcbiAgICAgICk7XG4gICAgfSBlbHNlIGlmIChbU1RBVFMsIEhJU1RPR1JBTV0uaW5jbHVkZXModHlwZSkpIHtcbiAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKGFjYywgY3JlYXRlTnVtZXJpY0FnZ3JlZ2F0aW9uKHsgdHlwZSwgZmllbGQsIGdyYXBocWxGaWVsZCB9KSk7XG4gICAgfSBlbHNlIGlmICh0eXBlID09PSBDQVJESU5BTElUWSkge1xuICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oYWNjLCBjb21wdXRlQ2FyZGluYWxpdHlBZ2dyZWdhdGlvbih7IHR5cGUsIGZpZWxkLCBncmFwaHFsRmllbGQgfSkpO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gYWNjO1xuICAgIH1cbiAgfSwge30pO1xufTtcbiJdfQ== |
@@ -20,2 +20,4 @@ "use strict"; | ||
var _buildQuery = require("../buildQuery"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -164,6 +166,18 @@ | ||
}); | ||
var contentsFiltered = ((normalizedSqon === null || normalizedSqon === void 0 ? void 0 : normalizedSqon.content) || []).filter(function (c) { | ||
var _c$content, _c$content$field, _c$content2, _c$content2$field, _c$content3; | ||
return aggregationsFilterThemselves ? (_c$content = c.content) === null || _c$content === void 0 ? void 0 : (_c$content$field = _c$content.field) === null || _c$content$field === void 0 ? void 0 : _c$content$field.startsWith(nestedPaths) : ((_c$content2 = c.content) === null || _c$content2 === void 0 ? void 0 : (_c$content2$field = _c$content2.field) === null || _c$content2$field === void 0 ? void 0 : _c$content2$field.startsWith(nestedPaths)) && ((_c$content3 = c.content) === null || _c$content3 === void 0 ? void 0 : _c$content3.field) !== field; | ||
}); | ||
var termFilters = contentsFiltered.map(function (filter) { | ||
return (0, _buildQuery.opSwitch)({ | ||
nestedFields: [], | ||
filter: filter | ||
}); | ||
}); | ||
var fieldAggregation = (0, _createFieldAggregation["default"])({ | ||
field: field, | ||
graphqlField: graphqlField, | ||
isNested: nestedPaths.length | ||
isNested: nestedPaths.length, | ||
termFilters: termFilters | ||
}); | ||
@@ -192,2 +206,2 @@ var aggregation = nestedPaths.reverse().reduce(function (aggs, path) { | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9pbmRleC5qcyJdLCJuYW1lcyI6WyJjcmVhdGVHbG9iYWxBZ2dyZWdhdGlvbiIsImZpZWxkIiwiYWdncmVnYXRpb24iLCJBR0dTX1dSQVBQRVJfR0xPQkFMIiwiZ2xvYmFsIiwiYWdncyIsImNyZWF0ZUZpbHRlcmVkQWdncmVnYXRpb24iLCJmaWx0ZXIiLCJPYmplY3QiLCJrZXlzIiwibGVuZ3RoIiwiQUdHU19XUkFQUEVSX0ZJTFRFUkVEIiwicmVtb3ZlRmllbGRGcm9tUXVlcnkiLCJxdWVyeSIsIm5lc3RlZCIsIkVTX05FU1RFRCIsIm5lc3RlZFF1ZXJ5IiwiRVNfUVVFUlkiLCJib29sIiwiRVNfQk9PTCIsInNvbWUiLCJrIiwiY2xlYW5lZCIsImZpbHRlcmVkIiwiZW50cmllcyIsInJlZHVjZSIsImFjYyIsInR5cGUiLCJ2YWx1ZXMiLCJmaWx0ZXJlZFZhbHVlcyIsIm1hcCIsInZhbHVlIiwiQm9vbGVhbiIsImdldE5lc3RlZFBhdGhzSW5GaWVsZCIsIm5lc3RlZEZpZWxkcyIsInNwbGl0IiwicyIsImkiLCJhcnIiLCJzbGljZSIsImpvaW4iLCJwIiwiaW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HF1ZXJ5LFxuICAgICAgICBmaWVsZCxcbiAgICAgICAgYWdncmVnYXRpb24sXG4gICAgICAgIGFnZ3JlZ2F0aW9uc0ZpbHRlclRoZW1zZWx2ZXMsXG4gICAgICB9KSxcbiAgICApO1xuICB9LCB7fSk7XG5cbiAgY29uc3QgZmlsdGVyZWRBZ2dyZWdhdGlvbnMgPSBpbmplY3ROZXN0ZWRGaWx0ZXJzVG9BZ2dzKHtcbiAgICBhZ2dzLFxuICAgIG5lc3RlZFNxb25GaWx0ZXJzLFxuICAgIGFnZ3JlZ2F0aW9uc0ZpbHRlclRoZW1zZWx2ZXMsXG4gIH0pO1xuXG4gIHJldHVybiBmaWx0ZXJlZEFnZ3JlZ2F0aW9ucztcbn1cbiJdfQ== |
@@ -204,3 +204,3 @@ "use strict"; | ||
function getGroupFilter(_ref9) { | ||
var _esFilters$, _esFilters$2; | ||
var _esFilters$; | ||
@@ -221,3 +221,7 @@ var nestedFields = _ref9.nestedFields, | ||
if (isNested && pivot === ((_esFilters$2 = esFilters[0]) === null || _esFilters$2 === void 0 ? void 0 : _esFilters$2.nested.path)) { | ||
if (isNested && esFilters.map(function (f) { | ||
var _f$nested; | ||
return (_f$nested = f.nested) === null || _f$nested === void 0 ? void 0 : _f$nested.path; | ||
}).includes(pivot)) { | ||
var flattned = esFilters.reduce(function (bools, esFilter) { | ||
@@ -362,2 +366,2 @@ return op === _constants.AND_OP || op === _constants.NOT_OP ? collapseNestedFilters({ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L2luZGV4LmpzIl0sIm5hbWVzIjpbIndyYXBGaWx0ZXIiLCJlc0ZpbHRlciIsIm5lc3RlZEZpZWxkcyIsImZpbHRlciIsImlzTm90IiwiY29udGVudCIsImZpZWxkIiwic3BsaXQiLCJzbGljZSIsIm1hcCIsInAiLCJpIiwic2VnbWVudHMiLCJqb2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uICAgICAgICAgIG9wOiBJTl9PUCxcbiAgICAgICAgICBjb250ZW50OiB7XG4gICAgICAgICAgICBmaWVsZDogZmlsdGVyLmNvbnRlbnQuZmllbGQsXG4gICAgICAgICAgICB2YWx1ZTogW3ZdLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pKSxcbiAgICAgIH0sXG4gICAgfSk7XG4gIH0gZWxzZSBpZiAoW0dUX09QLCBHVEVfT1AsIExUX09QLCBMVEVfT1BdLmluY2x1ZGVzKG9wKSkge1xuICAgIHJldHVybiBnZXRSYW5nZUZpbHRlcih7IG5lc3RlZEZpZWxkcywgZmlsdGVyIH0pO1xuICB9IGVsc2UgaWYgKFtCRVRXRUVOX09QXS5pbmNsdWRlcyhvcCkpIHtcbiAgICByZXR1cm4gZ2V0QmV0d2VlbkZpbHRlcih7IG5lc3RlZEZpZWxkcywgZmlsdGVyIH0pO1xuICB9IGVsc2UgaWYgKEZJTFRFUl9PUCA9PT0gb3ApIHtcbiAgICByZXR1cm4gZ2V0RnV6enlGaWx0ZXIoeyBuZXN0ZWRGaWVsZHMsIGZpbHRlciB9KTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ3Vua25vd24gb3AnKTtcbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gKHsgbmVzdGVkRmllbGRzLCBmaWx0ZXJzOiByYXdGaWx0ZXJzIH0pIHtcbiAgaWYgKE9iamVjdC5rZXlzKHJhd0ZpbHRlcnMgfHwge30pLmxlbmd0aCA9PT0gMCkgcmV0dXJuIHt9O1xuICByZXR1cm4gb3BTd2l0Y2goe1xuICAgIG5lc3RlZEZpZWxkcyxcbiAgICBmaWx0ZXI6IG5vcm1hbGl6ZUZpbHRlcnMocmF3RmlsdGVycyksXG4gIH0pO1xufVxuIl19 |
{ | ||
"name": "@arranger/middleware", | ||
"version": "2.16.1", | ||
"version": "2.16.2", | ||
"description": "Arranger Middleware", | ||
@@ -73,3 +73,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "8a984558a36b7c16ebc9079bc0f935b98ad0aa38" | ||
"gitHead": "9a33d6a14608f1394f43c8a0ab5d736048af799d" | ||
} |
@@ -252,1 +252,43 @@ import createFieldAggregation from '../../src/buildAggregations/createFieldAggregation'; | ||
}); | ||
test('it should generate nested terms filters in aggs ', () => { | ||
const input = { | ||
field: 'donors.zygosity', | ||
graphqlField: { | ||
buckets: { | ||
key: {}, | ||
doc_count: {}, | ||
}, | ||
}, | ||
isNested: 1, | ||
termFilters: [ | ||
{ terms: { 'donors.parental_origin': ['mother'], boost: 0 } }, | ||
{ terms: { 'donors.patient_id': ['PA00001'], boost: 0 } }, | ||
], | ||
}; | ||
const output = { | ||
'donors.zygosity:nested_filtered': { | ||
filter: { | ||
bool: { | ||
must: [ | ||
{ terms: { 'donors.parental_origin': ['mother'], boost: 0 } }, | ||
{ terms: { 'donors.patient_id': ['PA00001'], boost: 0 } }, | ||
], | ||
}, | ||
}, | ||
aggs: { | ||
'donors.zygosity': { | ||
aggs: { rn: { reverse_nested: {} } }, | ||
terms: { field: 'donors.zygosity', size: 300000 }, | ||
}, | ||
'donors.zygosity:missing': { | ||
aggs: { rn: { reverse_nested: {} } }, | ||
missing: { field: 'donors.zygosity' }, | ||
}, | ||
}, | ||
}, | ||
}; | ||
expect(createFieldAggregation(input)).toEqual(output); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
305885
5458