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:
+3
-2
@@ -2235,7 +2235,7 @@ async fn main() -> Result<()> {
|
||||
.await
|
||||
.context("Failed to init PostgreSQL")?;
|
||||
let qdrant = QdrantDb::init().await.context("Failed to init Qdrant")?;
|
||||
let embedder = Embedder::new("nomic-embed-text:v1.5".to_string());
|
||||
let embedder = Embedder::new("nomic-embed-text-v2-moe:latest".to_string());
|
||||
|
||||
let target_uuid = if uuid == "all" {
|
||||
None
|
||||
@@ -2261,7 +2261,8 @@ async fn main() -> Result<()> {
|
||||
for chunk in sentence_chunks {
|
||||
let text = chunk
|
||||
.content
|
||||
.get("text")
|
||||
.get("data")
|
||||
.and_then(|data| data.get("text"))
|
||||
.and_then(|v| v.as_str())
|
||||
.unwrap_or("");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user