Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,22 @@ void cosineSimilarity_InvalidVector() {
assertTrue(actualMessage.contains("arg2 is not of type vec:vector"), "Unexpected message: " + actualMessage);
}

@Test
// As of 07/26/24, this test will fail with the ML12 develop branch.
// However, it will succeed with the 12ea1 build.
// See https://progresssoftware.atlassian.net/browse/MLE-15707
void bindVectorFromDocs() {
PlanBuilder.ModifyPlan plan =
op.fromSearchDocs(
op.cts.andQuery(
op.cts.documentQuery("/optic/vectors/alice.json"),
op.cts.elementQuery(
"person",
op.cts.trueQuery()
)
))
.bind(op.as("embedding", op.vec.vector(op.xpath("doc", "/person/embedding"))));
List<RowRecord> rows = resultRows(plan);
assertEquals(1, rows.size());
}
}