@@ -95,55 +95,6 @@ fn test_bm25_with_file() {
95
95
fs:: remove_dir_all ( temp_dir) . unwrap_or ( ( ) ) ;
96
96
}
97
97
98
- /// Test creating a client with BM25 embedder and adding multiple contexts
99
- #[ test]
100
- fn test_bm25_multiple_contexts ( ) {
101
- // Create a temporary directory for the test
102
- let temp_dir = env:: temp_dir ( ) . join ( "semantic_search_test_bm25_multiple" ) ;
103
- let base_dir = temp_dir. join ( "semantic_search" ) ;
104
- fs:: create_dir_all ( & base_dir) . unwrap ( ) ;
105
-
106
- // Create a semantic search client with BM25 embedder
107
- let mut client = SemanticSearchClient :: with_embedding_type ( base_dir. clone ( ) , EmbeddingType :: BM25 ) . unwrap ( ) ;
108
-
109
- // Add multiple contexts
110
- let id1 = client
111
- . add_context_from_text (
112
- "BM25 is a keyword-based ranking function used in information retrieval" ,
113
- "BM25 Info" ,
114
- "Information about BM25 algorithm" ,
115
- false ,
116
- )
117
- . unwrap ( ) ;
118
-
119
- let id2 = client
120
- . add_context_from_text (
121
- "TF-IDF stands for Term Frequency-Inverse Document Frequency, a numerical statistic used in information retrieval" ,
122
- "TF-IDF Info" ,
123
- "Information about TF-IDF" ,
124
- false ,
125
- )
126
- . unwrap ( ) ;
127
-
128
- // Search across all contexts
129
- let results = client. search_all ( "information retrieval" , Some ( 5 ) ) . unwrap ( ) ;
130
-
131
- // Should find matches in both contexts
132
- assert ! ( !results. is_empty( ) ) ;
133
-
134
- // Verify we got results from both contexts
135
- let mut found_contexts = 0 ;
136
- for ( context_id, _) in & results {
137
- if context_id == & id1 || context_id == & id2 {
138
- found_contexts += 1 ;
139
- }
140
- }
141
- assert_eq ! ( found_contexts, 2 ) ;
142
-
143
- // Clean up
144
- fs:: remove_dir_all ( temp_dir) . unwrap_or ( ( ) ) ;
145
- }
146
-
147
98
/// Test BM25 with persistent contexts
148
99
#[ test]
149
100
fn test_bm25_persistent_context ( ) {
0 commit comments