(&mut self, key: KVPair)
| 173 | } |
| 174 | |
| 175 | pub fn get(&mut self, key: KVPair) -> Option<InvertedIndexItem> { |
| 176 | // println!("Getting key: {:?}", key); |
| 177 | match self.tree.search(key) { |
| 178 | Ok(v) => { |
| 179 | // decompress the indices |
| 180 | match v { |
| 181 | Some(mut item) => { |
| 182 | println!("Search result: {:?}", item); // Add this |
| 183 | |
| 184 | item.indices = decompress_indices(item.indices); |
| 185 | println!("Decompressed indices: {:?}", item.indices); // Check output |
| 186 | |
| 187 | Some(item) |
| 188 | } |
| 189 | None => None, |
| 190 | } |
| 191 | } |
| 192 | Err(_) => None, |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | pub fn insert_append(&mut self, key: KVPair, mut value: InvertedIndexItem) { |
| 197 | match self.get(key.clone()) { |
no test coverage detected