|
63 | 63 | import static org.elasticsearch.index.query.QueryStringQueryBuilder.TIME_ZONE_FIELD; |
64 | 64 | import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.FIRST; |
65 | 65 | import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.SECOND; |
66 | | -import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.THIRD; |
67 | 66 | import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isFoldable; |
68 | 67 | import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isMapExpression; |
69 | 68 | import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isNotNull; |
@@ -115,7 +114,9 @@ public class QueryString extends FullTextFunction implements OptionalArgument { |
115 | 114 | preview = true, |
116 | 115 | description = "Performs a <<query-dsl-query-string-query,query string query>>. " |
117 | 116 | + "Returns true if the provided query string matches the row.", |
118 | | - examples = { @Example(file = "qstr-function", tag = "qstr-with-field") } |
| 117 | + examples = { |
| 118 | + @Example(file = "qstr-function", tag = "qstr-with-field"), |
| 119 | + @Example(file = "qstr-function", tag = "qstr-with-options") } |
119 | 120 | ) |
120 | 121 | public QueryString( |
121 | 122 | Source source, |
@@ -349,12 +350,12 @@ private Map<String, Object> queryStringOptions() throws InvalidArgumentException |
349 | 350 |
|
350 | 351 | private TypeResolution resolveOptions() { |
351 | 352 | if (options() != null) { |
352 | | - TypeResolution resolution = isNotNull(options(), sourceText(), THIRD); |
| 353 | + TypeResolution resolution = isNotNull(options(), sourceText(), SECOND); |
353 | 354 | if (resolution.unresolved()) { |
354 | 355 | return resolution; |
355 | 356 | } |
356 | 357 | // MapExpression does not have a DataType associated with it |
357 | | - resolution = isMapExpression(options(), sourceText(), THIRD); |
| 358 | + resolution = isMapExpression(options(), sourceText(), SECOND); |
358 | 359 | if (resolution.unresolved()) { |
359 | 360 | return resolution; |
360 | 361 | } |
|
0 commit comments