mirror of
https://github.com/tcsenpai/pensieve.git
synced 2025-06-06 03:05:25 +00:00
fix: change sort by file_created_at desc
This commit is contained in:
parent
640da6e14f
commit
fe106e6b55
@ -457,7 +457,7 @@ def full_text_search(
|
||||
params["start"] = str(start)
|
||||
params["end"] = str(end)
|
||||
|
||||
sql_query += " ORDER BY bm25(entities_fts), entities.last_scan_at DESC LIMIT :limit"
|
||||
sql_query += " ORDER BY bm25(entities_fts), entities.file_created_at DESC LIMIT :limit"
|
||||
|
||||
result = db.execute(text(sql_query), params).fetchall()
|
||||
|
||||
@ -502,7 +502,7 @@ async def vec_search(
|
||||
params["start"] = str(start)
|
||||
params["end"] = str(end)
|
||||
|
||||
sql_query += " AND K = :limit ORDER BY distance, entities.last_scan_at DESC"
|
||||
sql_query += " AND K = :limit ORDER BY distance, entities.file_created_at DESC"
|
||||
|
||||
result = db.execute(text(sql_query), params).fetchall()
|
||||
|
||||
@ -593,6 +593,6 @@ async def list_entities(
|
||||
)
|
||||
)
|
||||
|
||||
entities = query.order_by(EntityModel.last_scan_at.desc()).limit(limit).all()
|
||||
entities = query.order_by(EntityModel.file_created_at.desc()).limit(limit).all()
|
||||
|
||||
return [Entity(**entity.__dict__) for entity in entities]
|
||||
|
Loading…
x
Reference in New Issue
Block a user