mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 05:39:12 +00:00
Consistently use "entry", "score" in json response for all search types
- Had already made some progress on this earlier by updating the image search responses. But needed to update the text search responses to use lowercase entry and score - Update khoj.el to consume the updated json response keys for text search
This commit is contained in:
@@ -151,8 +151,8 @@ def render_results(hits, entries, count=5, display_biencoder_results=False):
|
||||
def collate_results(hits, entries, count=5):
|
||||
return [
|
||||
{
|
||||
"Entry": entries[hit['corpus_id']]['raw'],
|
||||
"Score": f"{hit['cross-score']:.3f}"
|
||||
"entry": entries[hit['corpus_id']]['raw'],
|
||||
"score": f"{hit['cross-score']:.3f}"
|
||||
}
|
||||
for hit
|
||||
in hits[0:count]]
|
||||
|
||||
@@ -115,8 +115,8 @@ def render_results(hits, entries, count=5, display_biencoder_results=False):
|
||||
def collate_results(hits, entries, count=5):
|
||||
return [
|
||||
{
|
||||
"Entry": entries[hit['corpus_id']]['raw'],
|
||||
"Score": f"{hit['cross-score']:.3f}"
|
||||
"entry": entries[hit['corpus_id']]['raw'],
|
||||
"score": f"{hit['cross-score']:.3f}"
|
||||
}
|
||||
for hit
|
||||
in hits[0:count]]
|
||||
|
||||
Reference in New Issue
Block a user