|
50 | 50 | import static org.elasticsearch.common.logging.LoggerMessageFormat.format; |
51 | 51 | import static org.elasticsearch.index.query.MultiMatchQueryBuilder.ANALYZER_FIELD; |
52 | 52 | import static org.elasticsearch.index.query.MultiMatchQueryBuilder.FUZZINESS_FIELD; |
| 53 | +import static org.elasticsearch.index.query.MultiMatchQueryBuilder.FUZZY_REWRITE_FIELD; |
53 | 54 | import static org.elasticsearch.index.query.MultiMatchQueryBuilder.FUZZY_TRANSPOSITIONS_FIELD; |
54 | 55 | import static org.elasticsearch.index.query.MultiMatchQueryBuilder.GENERATE_SYNONYMS_PHRASE_QUERY; |
55 | 56 | import static org.elasticsearch.index.query.MultiMatchQueryBuilder.LENIENT_FIELD; |
@@ -124,6 +125,7 @@ public class MultiMatch extends FullTextFunction implements OptionalArgument, Po |
124 | 125 | entry(ANALYZER_FIELD.getPreferredName(), KEYWORD), |
125 | 126 | entry(GENERATE_SYNONYMS_PHRASE_QUERY.getPreferredName(), BOOLEAN), |
126 | 127 | entry(FUZZINESS_FIELD.getPreferredName(), KEYWORD), |
| 128 | + entry(FUZZY_REWRITE_FIELD.getPreferredName(), KEYWORD), |
127 | 129 | entry(FUZZY_TRANSPOSITIONS_FIELD.getPreferredName(), BOOLEAN), |
128 | 130 | entry(LENIENT_FIELD.getPreferredName(), BOOLEAN), |
129 | 131 | entry(MAX_EXPANSIONS_FIELD.getPreferredName(), INTEGER), |
@@ -190,6 +192,20 @@ public MultiMatch( |
190 | 192 | valueHint = { "AUTO", "1", "2" }, |
191 | 193 | description = "Maximum edit distance allowed for matching." |
192 | 194 | ), |
| 195 | + @MapParam.MapParamEntry( |
| 196 | + name = "fuzzy_rewrite", |
| 197 | + type = "keyword", |
| 198 | + valueHint = { |
| 199 | + "constant_score_blended", |
| 200 | + "constant_score", |
| 201 | + "constant_score_boolean", |
| 202 | + "top_terms_blended_freqs_N", |
| 203 | + "top_terms_boost_N", |
| 204 | + "top_terms_N" }, |
| 205 | + description = "Method used to rewrite the query. See the rewrite parameter for valid values and more information. " |
| 206 | + + "If the fuzziness parameter is not 0, the match query uses a fuzzy_rewrite method of " |
| 207 | + + "top_terms_blended_freqs_${max_expansions} by default." |
| 208 | + ), |
193 | 209 | @MapParam.MapParamEntry( |
194 | 210 | name = "fuzzy_transpositions", |
195 | 211 | type = "boolean", |
|
0 commit comments