-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32807 from vespa-engine/interns/magnus/rank-profi…
…le-default fix: overriding/extending rank-profile default in schema LS
- Loading branch information
Showing
5 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
integration/schema-language-server/language-server/src/test/sdfiles/single/defaultdefault.sd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This file tests if overriding/extending the rank-profile default works | ||
schema defaultdefault { | ||
document defaultdefault { | ||
field title type string { | ||
indexing: index | summary | ||
} | ||
|
||
field chunk type string { | ||
indexing: index | summary | ||
} | ||
} | ||
|
||
field embedding type tensor<bfloat16>(x[384]) { | ||
indexing: (input title || "") . " " . (input chunk || "") | embed e5 | attribute | index | ||
attribute { | ||
distance-metric: angular | ||
} | ||
} | ||
|
||
rank-profile default inherits default { | ||
function cos_sim() { | ||
expression: cos(distance(field, embedding)) | ||
} | ||
} | ||
|
||
rank-profile custom inherits default { | ||
function foo() { | ||
expression: cos_sim() | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters