diff --git a/extensions/Postgres/Postgres/Internals/PostgresDbClient.cs b/extensions/Postgres/Postgres/Internals/PostgresDbClient.cs index 31703158f..6025a4aaa 100644 --- a/extensions/Postgres/Postgres/Internals/PostgresDbClient.cs +++ b/extensions/Postgres/Postgres/Internals/PostgresDbClient.cs @@ -67,7 +67,7 @@ public PostgresDbClient(PostgresConfig config, ILoggerFactory? loggerFactory = n COALESCE(semantic_search.{this._colTags}, keyword_search.{this._colTags}) AS {this._colTags}, COALESCE(semantic_search.{this._colContent}, keyword_search.{this._colContent}) AS {this._colContent}, COALESCE(semantic_search.{this._colPayload}, keyword_search.{this._colPayload}) AS {this._colPayload}, - COALESCE(semantic_search.{this._colEmbedding}, keyword_search.{this._colEmbedding}) AS {this._colEmbedding}, + COALESCE(semantic_search.{this._colEmbedding}, keyword_search.{this._colEmbedding}) AS {this._colEmbedding} "; this._createTableSql = string.Empty; @@ -481,7 +481,7 @@ ORDER BY ts_rank_cd(to_tsvector('english', {this._colContent}), query) DESC LIMIT @limit ) SELECT - {this._columnsListHybridCoalesce} + {this._columnsListHybridCoalesce}, COALESCE(1.0 / ({this._rrf_K} + semantic_search.rank), 0.0) + COALESCE(1.0 / ({this._rrf_K} + keyword_search.rank), 0.0) AS {colDistance} FROM semantic_search