cruk-searchkit
Version:
Set of overriden and new searchkit components designed specifically for Cancer Research UK
22 lines (17 loc) • 508 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = CRUKSearchkitMultiMatchPhraseQuery;
var _lodash = require('lodash');
var _searchkit = require('searchkit');
function CRUKSearchkitMultiMatchPhraseQuery(query, options) {
if (!query) {
return;
}
return (0, _searchkit.BoolShould)([{
multi_match: (0, _lodash.assign)({ query: query }, options)
}, {
multi_match: (0, _lodash.assign)({ query: query }, options, { 'type': 'phrase' })
}]);
}