From 0a7103f6177437c29e8797954f0fa3e834e7bced Mon Sep 17 00:00:00 2001 From: nodkz Date: Tue, 3 Oct 2017 23:39:28 +0600 Subject: [PATCH] fix(MultiMatch): add missing fields to multi_match query --- .../Aggs/__tests__/__snapshots__/Aggs-test.js.snap | 8 ++++++++ src/elasticDSL/Query/FullText/MultiMatch.js | 9 +++++++++ .../Query/__tests__/__snapshots__/Query-test.js.snap | 8 ++++++++ 3 files changed, 25 insertions(+) diff --git a/src/elasticDSL/Aggs/__tests__/__snapshots__/Aggs-test.js.snap b/src/elasticDSL/Aggs/__tests__/__snapshots__/Aggs-test.js.snap index 1a16585..c62c918 100644 --- a/src/elasticDSL/Aggs/__tests__/__snapshots__/Aggs-test.js.snap +++ b/src/elasticDSL/Aggs/__tests__/__snapshots__/Aggs-test.js.snap @@ -1091,6 +1091,14 @@ input Elastic_QueryMultiMatch_50 { operator: Elastic_QueryMultiMatchOperatorEnum_50 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 } enum Elastic_QueryMultiMatchOperatorEnum_50 { diff --git a/src/elasticDSL/Query/FullText/MultiMatch.js b/src/elasticDSL/Query/FullText/MultiMatch.js index 2cbf924..cd3ef9f 100644 --- a/src/elasticDSL/Query/FullText/MultiMatch.js +++ b/src/elasticDSL/Query/FullText/MultiMatch.js @@ -40,6 +40,15 @@ export function getMultiMatchITC(opts: mixed = {}): InputTypeComposer { }`, 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', + // lenient: 'JSON', // depricated from ES 5.3 }, }) ); diff --git a/src/elasticDSL/Query/__tests__/__snapshots__/Query-test.js.snap b/src/elasticDSL/Query/__tests__/__snapshots__/Query-test.js.snap index bb21d6b..55bf7f2 100644 --- a/src/elasticDSL/Query/__tests__/__snapshots__/Query-test.js.snap +++ b/src/elasticDSL/Query/__tests__/__snapshots__/Query-test.js.snap @@ -301,6 +301,14 @@ input Elastic_QueryMultiMatch_50 { operator: Elastic_QueryMultiMatchOperatorEnum_50 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 } enum Elastic_QueryMultiMatchOperatorEnum_50 {