Skip to content

Commit

Permalink
Fix to get score associated with SearchResponse in result as string
Browse files Browse the repository at this point in the history
  • Loading branch information
debanjum committed Apr 16, 2023
1 parent d5000c6 commit dc3f399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/khoj/search_type/text_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def collate_results(hits, entries: List[Entry], count=5) -> List[SearchResponse]
SearchResponse.parse_obj(
{
"entry": entries[hit["corpus_id"]].raw,
"score": f"{hit.get('cross-score', 'score')}:.3f",
"score": f"{hit.get('cross-score') or hit.get('score')}",
"additional": {"file": entries[hit["corpus_id"]].file, "compiled": entries[hit["corpus_id"]].compiled},
}
)
Expand Down

0 comments on commit dc3f399

Please sign in to comment.