postgresqlPackages.pg_textsearch: fix broken test

This commit is contained in:
Daniel Beecham
2026-06-04 15:26:16 +02:00
parent 4ad7a06b58
commit 88477c7ba4

View File

@@ -31,10 +31,11 @@ postgresqlBuildExtension (finalAttrs: {
('PostgreSQL is a powerful, open source object-relational database system');
CREATE INDEX documents_content_bm25_idx ON documents USING bm25(content) WITH (text_config='english');
'';
asserts = [
{
query = "SELECT count(*) FROM documents ORDER BY content <@> 'nix' LIMIT 10";
expected = "2";
query = "SELECT content FROM documents ORDER BY content <@> 'NixOS' LIMIT 1";
expected = "'NixOS provides declarative configuration and reproducible system builds with the Nix package manager'";
description = "BM25 index can be queried successfully.";
}
];