graphql-compose-elasticsearch
Version:
Elastic search via GraphQL
26 lines • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMoreLikeThisITC = void 0;
const utils_1 = require("../../../utils");
const FieldNames_1 = require("../../Commons/FieldNames");
function getMoreLikeThisITC(opts) {
const name = (0, utils_1.getTypeName)('QueryMoreLikeThis', opts);
const description = (0, utils_1.desc)(`
The More Like This Query (MLT Query) finds documents that are like a given set of documents.
[Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html)
`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
fields: [(0, FieldNames_1.getAnalyzedFields)(opts)],
like: 'JSON',
unlike: 'JSON',
min_term_freq: 'Int',
max_query_terms: 'Int',
boost: 'Float',
},
}));
}
exports.getMoreLikeThisITC = getMoreLikeThisITC;
//# sourceMappingURL=MoreLikeThis.js.map