mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-11 07:06:57 +08:00
Added Jaccard distance to test
This commit is contained in:
@@ -68,8 +68,8 @@ for (1 .. 20)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Check each index type
|
# Check each index type
|
||||||
my @operators = ("<~>");
|
my @operators = ("<~>", "<\%>");
|
||||||
my @opclasses = ("bit_hamming_ops");
|
my @opclasses = ("bit_hamming_ops", "bit_jaccard_ops");
|
||||||
|
|
||||||
for my $i (0 .. $#operators)
|
for my $i (0 .. $#operators)
|
||||||
{
|
{
|
||||||
@@ -97,7 +97,7 @@ for my $i (0 .. $#operators)
|
|||||||
));
|
));
|
||||||
|
|
||||||
# Test approximate results
|
# Test approximate results
|
||||||
my $min = 0.93;
|
my $min = $operator eq "<\%>" ? 0.87 : 0.93;
|
||||||
test_recall($min, $operator);
|
test_recall($min, $operator);
|
||||||
|
|
||||||
$node->safe_psql("postgres", "DROP INDEX idx;");
|
$node->safe_psql("postgres", "DROP INDEX idx;");
|
||||||
|
|||||||
Reference in New Issue
Block a user