parent
3ed87eaba2
commit
0f6e5f5b10
2 changed files with 2 additions and 1 deletions
|
@ -234,6 +234,7 @@ impl EmbedStore {
|
|||
// TODO : fix search
|
||||
// + new ranked algorithm
|
||||
// + better repr
|
||||
// limit should cover SearchResults not the query -> rework
|
||||
|
||||
let results: Vec<DocEmbedding> = sqlx::query_as(
|
||||
"SELECT *, 1 / (1 + (embed_mxbai_embed_large <-> $1)) AS similarity FROM doc_embedding ORDER BY embed_mxbai_embed_large <-> $1 LIMIT $2 OFFSET $3",
|
||||
|
|
|
@ -236,7 +236,7 @@ pub async fn vector_search(
|
|||
EmbedStore::search_vector(&input, limit as i64, offset as i64).await
|
||||
})
|
||||
},
|
||||
50,
|
||||
1500,
|
||||
)
|
||||
.pager(page as u64, vector)
|
||||
.await;
|
||||
|
|
Loading…
Add table
Reference in a new issue