@enonic/js-utils
Version:
Enonic XP JavaScript Utils
24 lines (22 loc) • 467 B
JavaScript
// storage/query/dsl/term.ts
var DSL_EXPRESSION_VALUE_TYPE_DATE_TIME = "dateTime";
var DSL_EXPRESSION_VALUE_TYPE_TIME = "time";
// storage/query/dsl/inQuery.ts
function inQuery(field, values, boost, type) {
const obj = {
field,
values
};
if (boost) {
obj.boost = boost;
}
if (type === DSL_EXPRESSION_VALUE_TYPE_TIME || type === DSL_EXPRESSION_VALUE_TYPE_DATE_TIME) {
obj.type = type;
}
return {
in: obj
};
}
export {
inQuery
};