Skip to content

Commit 9537344

Browse files
Fix merge error
1 parent 4007272 commit 9537344

File tree

1 file changed

+7
-2
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext

1 file changed

+7
-2
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/FullTextFunction.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@
5454

5555
import static org.elasticsearch.xpack.esql.common.Failure.fail;
5656
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.DEFAULT;
57-
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isString;
57+
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.SECOND;
58+
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isNotNull;
59+
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isType;
60+
import static org.elasticsearch.xpack.esql.core.type.DataType.DENSE_VECTOR;
5861
import static org.elasticsearch.xpack.esql.expression.function.FunctionUtils.postOptimizationVerificationQuery;
5962
import static org.elasticsearch.xpack.esql.expression.function.FunctionUtils.resolveTypeQuery;
6063

@@ -109,7 +112,9 @@ protected TypeResolution resolveParams() {
109112
* @return type resolution for the query parameter
110113
*/
111114
protected TypeResolution resolveQuery(TypeResolutions.ParamOrdinal queryOrdinal) {
112-
TypeResolution result = isString(query(), sourceText(), queryOrdinal).and(isNotNull(query(), sourceText(), queryOrdinal));
115+
TypeResolution result = isType(query(), dt -> dt == DENSE_VECTOR, sourceText(), SECOND, "dense_vector").and(
116+
isNotNull(query(), sourceText(), SECOND)
117+
);
113118
if (result.unresolved()) {
114119
return result;
115120
}

0 commit comments

Comments
 (0)