We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c9efe4 commit 3d85c65Copy full SHA for 3d85c65
1 file changed
graphile/graphile-pg-textsearch-plugin/src/bm25-search.ts
@@ -396,7 +396,8 @@ export function createBm25SearchPlugin(
396
397
const columnExpr = sql`${$condition.alias}.${sql.identifier(attributeName)}`;
398
// Use to_bm25query with explicit index name for reliable scoring
399
- const bm25queryExpr = sql`to_bm25query(${sql.value(query)}, ${sql.value(bm25Index.indexName)})`;
+ const qualifiedIndexName = `"${bm25Index.schemaName}"."${bm25Index.indexName}"`;
400
+ const bm25queryExpr = sql`to_bm25query(${sql.value(query)}, ${sql.value(qualifiedIndexName)})`;
401
const scoreExpr = sql`(${columnExpr} <@> ${bm25queryExpr})`;
402
403
// If a threshold is provided, add WHERE clause
0 commit comments