Skip to content

Commit b4fa02a

Browse files
committed
Fix order by without an explicit index
1 parent 53b8b9d commit b4fa02a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/torus/search/bm25.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ defmodule Torus.Search.BM25 do
2323
)
2424

2525
# Build the BM25 query fragments
26-
# When index_name is provided, use 2-arg form for explicit index specification
27-
# Otherwise use 1-arg form and let PostgreSQL auto-detect the index
26+
# When index_name is provided, use to_bm25query(?, ?) for explicit index specification
27+
# Otherwise use bare string literal (?) to let PostgreSQL auto-detect the index
2828
{bm25query_fragment, bm25query_params} =
2929
if index_name do
3030
{
@@ -33,7 +33,7 @@ defmodule Torus.Search.BM25 do
3333
}
3434
else
3535
{
36-
"to_bm25query(?)",
36+
"?",
3737
[term]
3838
}
3939
end

0 commit comments

Comments
 (0)