feat: fix Chinese text search and duplicate chunk_id bug
- Add helper functions to extract text from nested content structure - Update SearchResult to include uuid field - Add PostgreSQL function get_chunk_by_chunk_id_and_uuid to handle duplicate chunk_ids - Update Qdrant search functions to extract uuid from payload - Change embedding model to nomic-embed-text-v2-moe:latest - Update Qdrant collection name to momentry_rule1 - Fix MongoDB authentication and disable cache for development - Improve error handling in processor.rs - Update documentation with new embedding model
This commit is contained in:
@@ -486,17 +486,10 @@ impl ProcessorPool {
|
||||
asr_result: &AsrResult,
|
||||
) -> Result<()> {
|
||||
// Get video record to obtain file_id and fps
|
||||
let video = match db.get_video_by_uuid(uuid).await {
|
||||
Ok(Some(video)) => video,
|
||||
Ok(None) => {
|
||||
tracing::error!("Video not found for uuid: {}", uuid);
|
||||
return Ok(());
|
||||
}
|
||||
Err(e) => {
|
||||
tracing::error!("Failed to get video for uuid {}: {}", uuid, e);
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
let video = db
|
||||
.get_video_by_uuid(uuid)
|
||||
.await?
|
||||
.ok_or_else(|| anyhow::anyhow!("Video not found for uuid: {}", uuid))?;
|
||||
let file_id = video.id;
|
||||
let fps = if video.fps > 0.0 { video.fps } else { 30.0 };
|
||||
|
||||
@@ -538,17 +531,10 @@ impl ProcessorPool {
|
||||
cut_result: &CutResult,
|
||||
) -> Result<()> {
|
||||
// Get video record to obtain file_id and fps
|
||||
let video = match db.get_video_by_uuid(uuid).await {
|
||||
Ok(Some(video)) => video,
|
||||
Ok(None) => {
|
||||
tracing::error!("Video not found for uuid: {}", uuid);
|
||||
return Ok(());
|
||||
}
|
||||
Err(e) => {
|
||||
tracing::error!("Failed to get video for uuid {}: {}", uuid, e);
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
let video = db
|
||||
.get_video_by_uuid(uuid)
|
||||
.await?
|
||||
.ok_or_else(|| anyhow::anyhow!("Video not found for uuid: {}", uuid))?;
|
||||
let file_id = video.id;
|
||||
let fps = if video.fps > 0.0 { video.fps } else { 30.0 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user