Skip to content

Commit c8ca11e

Browse files
Merge pull request #35783 from vespa-engine/theodorkl/lsp-support-tensorFromStructs
Add support for tensorFromStructs in LSP
2 parents fec03bc + db24f00 commit c8ca11e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/resolvers/RankExpression

integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/resolvers/RankExpression/BuiltInFunctions.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,17 @@ public class BuiltInFunctions {
8888
))
8989
)));
9090

91+
// TODO: requires you to write attribute(name)
92+
put("tensorFromStructs", new GenericFunction("tensorFromStructs", new FunctionSignature(List.of(
93+
new FieldArgument(FieldArgument.AnyFieldType, FieldArgument.IndexAttributeType, "attribute"),
94+
new StringArgument("key"),
95+
new StringArgument("value"),
96+
new EnumArgument("type", List.of(
97+
"float",
98+
"double"
99+
))
100+
))));
101+
91102
// ==== Field match features - normalized ====
92103
put("fieldMatch", new GenericFunction("fieldMatch", new FieldArgument(FieldType.STRING), Set.of(
93104
"",

0 commit comments

Comments
 (0)