UNPKG

graphql-compose-elasticsearch

Version:
48 lines 1.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getMultiMatchITC = void 0; const utils_1 = require("../../../utils"); function getMultiMatchITC(opts) { const name = (0, utils_1.getTypeName)('QueryMultiMatch', opts); const description = (0, utils_1.desc)(` The multi_match query builds on the match query to allow multi-field queries. [Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html) `); return opts.getOrCreateITC(name, () => ({ name, description, fields: { query: 'String!', fields: { type: '[String]!', description: (0, utils_1.desc)(` Array of fields [ title, *_name, subject^3 ]. You may use wildcards and boosting field. `), }, type: `enum ${(0, utils_1.getTypeName)('QueryMultiMatchTypeEnum', opts)} { best_fields most_fields cross_fields phrase phrase_prefix }`, operator: `enum ${(0, utils_1.getTypeName)('QueryMultiMatchOperatorEnum', opts)} { and or }`, minimum_should_match: 'String', analyzer: 'String', slop: 'Int', boost: 'Float', fuzziness: 'JSON', prefix_length: 'Int', max_expansions: 'Int', rewrite: 'String', zero_terms_query: 'JSON', cutoff_frequency: 'Float', }, })); } exports.getMultiMatchITC = getMultiMatchITC; //# sourceMappingURL=MultiMatch.js.map