@arranger/middleware
Advanced tools
Comparing version 1.0.34 to 1.0.35
@@ -240,5 +240,24 @@ "use strict"; | ||
var opSwitch = function opSwitch(_ref10) { | ||
var getBetweenFilter = function getBetweenFilter(_ref10) { | ||
var _field2; | ||
var nestedFields = _ref10.nestedFields, | ||
filter = _ref10.filter; | ||
var _filter$content4 = filter.content, | ||
field = _filter$content4.field, | ||
value = _filter$content4.value; | ||
return wrapFilter({ | ||
filter: filter, | ||
nestedFields: nestedFields, | ||
esFilter: { | ||
range: _defineProperty({}, field, (_field2 = { | ||
boost: 0 | ||
}, _defineProperty(_field2, _constants.GTE_OP, _lodash.default.min(value)), _defineProperty(_field2, _constants.LTE_OP, _lodash.default.max(value)), _field2)) | ||
} | ||
}); | ||
}; | ||
var opSwitch = function opSwitch(_ref11) { | ||
var nestedFields = _ref11.nestedFields, | ||
filter = _ref11.filter; | ||
var op = filter.op, | ||
@@ -283,2 +302,7 @@ pivot = filter.pivot, | ||
}); | ||
} else if ([_constants.BETWEEN_OP].includes(op)) { | ||
return getBetweenFilter({ | ||
nestedFields: nestedFields, | ||
filter: filter | ||
}); | ||
} else if (_constants.FILTER_OP === op) { | ||
@@ -296,5 +320,5 @@ return getFuzzyFilter({ | ||
function _default(_ref11) { | ||
var nestedFields = _ref11.nestedFields, | ||
rawFilters = _ref11.filters; | ||
function _default(_ref12) { | ||
var nestedFields = _ref12.nestedFields, | ||
rawFilters = _ref12.filters; | ||
if (Object.keys(rawFilters || {}).length === 0) return {}; | ||
@@ -312,2 +336,2 @@ var output = opSwitch({ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L2luZGV4LmpzIl0sIm5hbWVzIjpbIndyYXBGaWx0ZXIiLCJlc0ZpbHRlciIsIm5lc3RlZEZpZWxkcyIsImZpbHRlciIsImlzTm90IiwiY29udGVudCIsImZpZWxkIiwic3BsaXQiLCJzb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BmaWx0ZXJzOiByYXdGaWx0ZXJzIH0pIHtcbiAgaWYgKE9iamVjdC5rZXlzKHJhd0ZpbHRlcnMgfHwge30pLmxlbmd0aCA9PT0gMCkgcmV0dXJuIHt9O1xuICBjb25zdCBvdXRwdXQgPSBvcFN3aXRjaCh7XG4gICAgbmVzdGVkRmllbGRzLFxuICAgIGZpbHRlcjogbm9ybWFsaXplRmlsdGVycyhyYXdGaWx0ZXJzKSxcbiAgfSk7XG4gIGNvbnNvbGUubG9nKFxuICAgICdpbnB1dDogJyxcbiAgICBKU09OLnN0cmluZ2lmeSh7XG4gICAgICBuZXN0ZWRGaWVsZHMsXG4gICAgICBmaWx0ZXJzOiByYXdGaWx0ZXJzLFxuICAgIH0pLFxuICApO1xuICBjb25zb2xlLmxvZygnb3V0cHV0OiAnLCBKU09OLnN0cmluZ2lmeShvdXRwdXQpKTtcbiAgcmV0dXJuIG91dHB1dDtcbn1cbiJdfQ== |
@@ -64,38 +64,2 @@ "use strict"; | ||
/** | ||
* Special handlings for BETWEEN_OP: | ||
* - "betweeb" special default for "pivot" based on the content | ||
* field | ||
* - preserves grouping so for easy conversion to ES query based on pivot | ||
**/ | ||
var transformBetweenOp = function transformBetweenOp(filter) { | ||
var _applyDefaultPivots; | ||
var content = filter.content; | ||
var field = content.field; | ||
var fieldPaths = field.includes('.') ? field.split('.') : []; | ||
var defaultPivot = fieldPaths.length ? fieldPaths.slice(0, fieldPaths.length - 1).join('.') : null; | ||
if (!(0, _lodash.isArray)(filter.content.value)) { | ||
throw Error("value of ".concat(_constants.BETWEEN_OP, " must be array")); | ||
} | ||
return applyDefaultPivots((_applyDefaultPivots = { | ||
op: _constants.AND_OP | ||
}, _defineProperty(_applyDefaultPivots, _UNFLAT_KEY_, true), _defineProperty(_applyDefaultPivots, "pivot", filter.pivot || defaultPivot), _defineProperty(_applyDefaultPivots, "content", [{ | ||
op: _constants.GTE_OP, | ||
content: { | ||
field: filter.content.field, | ||
value: [(0, _lodash.min)(filter.content.value.map(Number))] | ||
} | ||
}, { | ||
op: _constants.LTE_OP, | ||
content: { | ||
field: filter.content.field, | ||
value: [(0, _lodash.max)(filter.content.value.map(Number))] | ||
} | ||
}]), _applyDefaultPivots)); | ||
}; | ||
/** | ||
* Special handlings for ALL_OP: | ||
@@ -109,3 +73,3 @@ * - "all" special default for "pivot" based on the content | ||
var transformAllOp = function transformAllOp(filter) { | ||
var _applyDefaultPivots2; | ||
var _applyDefaultPivots; | ||
@@ -116,5 +80,5 @@ var content = filter.content; | ||
var defaultPivot = fieldPaths.length ? fieldPaths.slice(0, fieldPaths.length - 1).join('.') : null; | ||
return applyDefaultPivots((_applyDefaultPivots2 = { | ||
return applyDefaultPivots((_applyDefaultPivots = { | ||
op: _constants.AND_OP | ||
}, _defineProperty(_applyDefaultPivots2, _UNFLAT_KEY_, true), _defineProperty(_applyDefaultPivots2, "pivot", filter.pivot || defaultPivot), _defineProperty(_applyDefaultPivots2, "content", filter.content.value.map(function (val) { | ||
}, _defineProperty(_applyDefaultPivots, _UNFLAT_KEY_, true), _defineProperty(_applyDefaultPivots, "pivot", filter.pivot || defaultPivot), _defineProperty(_applyDefaultPivots, "content", filter.content.value.map(function (val) { | ||
return { | ||
@@ -127,3 +91,3 @@ op: _constants.IN_OP, | ||
}; | ||
})), _applyDefaultPivots2)); | ||
})), _applyDefaultPivots)); | ||
}; | ||
@@ -174,4 +138,2 @@ | ||
}); | ||
} else if ([_constants.BETWEEN_OP].includes(op)) { | ||
return transformBetweenOp(filter); | ||
} else if ([_constants.ALL_OP].includes(op)) { | ||
@@ -192,2 +154,2 @@ return transformAllOp(filter); | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L25vcm1hbGl6ZUZpbHRlcnMuanMiXSwibmFtZXMiOlsiX1VORkxBVF9LRVlfIiwiZ3JvdXBpbmdPcHRpbWl6ZXIiL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IGNvbnRlbnQ6IHsgLi4uY29udGVudCwgdmFsdWU6IG5vcm1hbFZhbHVlcyB9IH0sXG4gICAgICAgICAgICAuLi5zcGVjaWFsRmlsdGVycyxcbiAgICAgICAgICBdXG4gICAgICAgIDogc3BlY2lhbEZpbHRlcnM7XG5cbiAgICByZXR1cm4gbm9ybWFsaXplRmlsdGVycyh7IG9wOiBPUl9PUCwgY29udGVudDogZmlsdGVycyB9KTtcbiAgfSBlbHNlIGlmIChbQUxMX09QXS5pbmNsdWRlcyhvcCkpIHtcbiAgICByZXR1cm4gdHJhbnNmb3JtQWxsT3AoZmlsdGVyKTtcbiAgfSBlbHNlIGlmIChbQU5EX09QLCBPUl9PUCwgTk9UX09QXS5pbmNsdWRlcyhvcCkpIHtcbiAgICByZXR1cm4gZ3JvdXBpbmdPcHRpbWl6ZXIoZmlsdGVyKTtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm4gZmlsdGVyO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IGZpbHRlciA9PiB7XG4gIGNvbnN0IG91dHB1dCA9IGZpbHRlciA/IGFwcGx5RGVmYXVsdFBpdm90cyhub3JtYWxpemVGaWx0ZXJzKGZpbHRlcikpIDogZmlsdGVyO1xuICByZXR1cm4gb3V0cHV0O1xufTtcbiJdfQ== |
{ | ||
"name": "@arranger/middleware", | ||
"version": "1.0.34", | ||
"version": "1.0.35", | ||
"description": "Arranger Middleware", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -920,43 +920,19 @@ import buildQuery from '../../src/buildQuery'; | ||
{ | ||
bool: { | ||
must: [ | ||
{ | ||
nested: { | ||
path: 'biospecimens', | ||
query: { | ||
bool: { | ||
must: [ | ||
{ | ||
range: { | ||
'biospecimens.age_at_event_days': { | ||
boost: 0, | ||
gte: 200, | ||
}, | ||
}, | ||
}, | ||
], | ||
nested: { | ||
path: 'biospecimens', | ||
query: { | ||
bool: { | ||
must: [ | ||
{ | ||
range: { | ||
'biospecimens.age_at_event_days': { | ||
boost: 0, | ||
gte: 200, | ||
lte: '10000', | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
{ | ||
nested: { | ||
path: 'biospecimens', | ||
query: { | ||
bool: { | ||
must: [ | ||
{ | ||
range: { | ||
'biospecimens.age_at_event_days': { | ||
boost: 0, | ||
lte: 10000, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
@@ -963,0 +939,0 @@ }, |
import normalizeFilters from '../../src/buildQuery/normalizeFilters'; | ||
import { | ||
IN_OP, | ||
OR_OP, | ||
AND_OP, | ||
ALL_OP, | ||
BETWEEN_OP, | ||
GTE_OP, | ||
LTE_OP, | ||
} from '../../src/constants'; | ||
import { IN_OP, OR_OP, AND_OP, ALL_OP } from '../../src/constants'; | ||
@@ -70,43 +62,2 @@ test(`normalizeFilters must handle falsy sqon`, () => { | ||
test(`normalizeFilters must handle "between" op`, () => { | ||
const input = { | ||
op: AND_OP, | ||
content: [ | ||
{ | ||
op: BETWEEN_OP, | ||
content: { | ||
field: 'biospecimens.age_at_event_days', | ||
value: ['200', '10000'], | ||
}, | ||
}, | ||
], | ||
}; | ||
const output = { | ||
op: AND_OP, | ||
pivot: null, | ||
content: [ | ||
{ | ||
op: AND_OP, | ||
pivot: 'biospecimens', | ||
content: [ | ||
{ | ||
op: GTE_OP, | ||
content: { field: 'biospecimens.age_at_event_days', value: [200] }, | ||
pivot: null, | ||
}, | ||
{ | ||
op: LTE_OP, | ||
content: { | ||
field: 'biospecimens.age_at_event_days', | ||
value: [10000], | ||
}, | ||
pivot: null, | ||
}, | ||
], | ||
}, | ||
], | ||
}; | ||
expect(normalizeFilters(input)).toEqual(output); | ||
}); | ||
test(`normalizeFilters must preserve pivots`, () => { | ||
@@ -113,0 +64,0 @@ const input = { |
229791
5260