File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -273,7 +273,8 @@ pub async fn get_content_chunk_from_point_ids_query(
273273 . filter ( chunk_metadata_columns:: qdrant_point_id. eq_any ( & point_ids) )
274274 . load ( & mut conn)
275275 . await
276- . map_err ( |_| {
276+ . map_err ( |e| {
277+ log:: error!( "Failed to load content chunk metadatas: {:?}" , e) ;
277278 ServiceError :: BadRequest ( "Failed to load content chunk metadatas" . to_string ( ) )
278279 } ) ?;
279280
Original file line number Diff line number Diff line change @@ -934,14 +934,15 @@ pub async fn cross_encoder(
934934 let common_request_docs = results
935935 . clone ( )
936936 . into_iter ( )
937- . map ( |x| {
938- let chunk = match x. metadata . get ( 0 ) . cloned ( ) {
939- Some ( ChunkMetadataTypes :: Metadata ( metadata) ) => Ok ( metadata) ,
937+ . map ( |score_chunk_dto| {
938+ let chunk_html = match score_chunk_dto. metadata . get ( 0 ) . cloned ( ) {
939+ Some ( ChunkMetadataTypes :: Metadata ( chunk_metadata_string_tag_set) ) => Ok ( chunk_metadata_string_tag_set. chunk_html ) ,
940+ Some ( ChunkMetadataTypes :: Content ( content_chunk_metadata) ) => Ok ( content_chunk_metadata. chunk_html ) ,
940941 _ => Err ( ServiceError :: BadRequest (
941- "ChunkMetadataStringTagSet not found for chunk in results " . to_string ( ) ,
942+ "Cannot rerank SlimChunkMetadata ScoreChunks since they do not have any text in their chunk_html " . to_string ( ) ,
942943 ) ) ,
943944 } ?;
944- Ok ( convert_html_to_text ( & chunk . chunk_html . unwrap_or_default ( ) )
945+ Ok ( convert_html_to_text ( & chunk_html. unwrap_or_default ( ) )
945946 . split_whitespace ( )
946947 . take ( max_words_to_rerank)
947948 . join ( " " ) )
You can’t perform that action at this time.
0 commit comments