add score to full text search
This commit is contained in:
parent
47c433e7c1
commit
c6458c6ec1
|
@ -53,7 +53,12 @@ class SearchProcess:
|
|||
if index == "ta_subtitle":
|
||||
processed = self._process_subtitle(result)
|
||||
|
||||
processed.update({"_index": index})
|
||||
processed.update(
|
||||
{
|
||||
"_index": index,
|
||||
"_score": round(result.get("_score", 0), 2),
|
||||
}
|
||||
)
|
||||
|
||||
return processed
|
||||
|
||||
|
|
|
@ -1147,12 +1147,13 @@ function createFulltext(fullText) {
|
|||
</div>
|
||||
</a>
|
||||
<div class="video-desc list">
|
||||
<div>
|
||||
<a href="/channel/${fullText.subtitle_channel_id}/"><h3>${fullText.subtitle_channel}</h3></a>
|
||||
<a class="video-more" href="/video/${videoId}/?t=${subtitle_start}"><h2>${fullText.title}</h2></a>
|
||||
</div>
|
||||
<p>${subtitle_start} - ${subtitle_end}</p>
|
||||
<p>${fullText.subtitle_line}</p>
|
||||
<div>
|
||||
<a href="/channel/${fullText.subtitle_channel_id}/"><h3>${fullText.subtitle_channel}</h3></a>
|
||||
<a class="video-more" href="/video/${videoId}/?t=${subtitle_start}"><h2>${fullText.title}</h2></a>
|
||||
</div>
|
||||
<span class="settings-current">Score: ${fullText._score}</span>
|
||||
</div>
|
||||
`;
|
||||
const fullTextDiv = document.createElement('div');
|
||||
|
|
Loading…
Reference in New Issue