fixed duplicat enrichment
This commit is contained in:
@@ -172,13 +172,7 @@ def fetch_bm25_corpus_records(session: Session) -> list[dict[str, object]]:
|
|||||||
EbookSource.author.label("source_author"),
|
EbookSource.author.label("source_author"),
|
||||||
EbookChapter.title.label("chapter_title"),
|
EbookChapter.title.label("chapter_title"),
|
||||||
EbookChunk.page_label.label("page_label"),
|
EbookChunk.page_label.label("page_label"),
|
||||||
func.concat_ws(
|
EbookChunk.search_text.label("bm25_text"),
|
||||||
" ",
|
|
||||||
EbookSource.title,
|
|
||||||
EbookSource.author,
|
|
||||||
EbookChapter.title,
|
|
||||||
EbookChunk.search_text,
|
|
||||||
).label("bm25_text"),
|
|
||||||
)
|
)
|
||||||
.select_from(EbookChunk)
|
.select_from(EbookChunk)
|
||||||
.join(EbookSource, EbookSource.id == EbookChunk.source_id)
|
.join(EbookSource, EbookSource.id == EbookChunk.source_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user