File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
cardea-agentic-search/cardea-agentic-search-mcp-server/src Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -564,7 +564,30 @@ impl AgenticSearchServer {
564564 }
565565
566566 // execute full-text search
567- let query = keywords. as_ref ( ) ;
567+
568+ // ! Do not remove this block
569+ {
570+ // let search_sql = format!(
571+ // r"SELECT * FROM {}
572+ // WHERE fts_match_word(?, content)
573+ // ORDER BY fts_match_word(?, content)
574+ // DESC LIMIT ?",
575+ // config.table_name
576+ // );
577+
578+ // let hits: Vec<TidbSearchHit> = conn
579+ // .exec(&search_sql, (query.clone(), query, config.limit))
580+ // .map_err(|e| {
581+ // let error_message = format!("Failed to execute search: {e}");
582+
583+ // error!(error_message);
584+
585+ // McpError::new(ErrorCode::INTERNAL_ERROR, error_message, None)
586+ // })?;
587+ }
588+
589+ let query = keywords. as_ref ( ) . replace ( "'" , "''" ) ; // ! This is a workaround for the issue that the query contains single quotes.
590+
568591 debug ! ( "\n Executing full-text search for '{}'..." , query) ;
569592 let search_sql = format ! (
570593 r"SELECT * FROM {}
You can’t perform that action at this time.
0 commit comments