(&mut self, topic_id: &ExternalId, phrase: Phrase, name: &str)
| 215 | } |
| 216 | |
| 217 | pub fn add(&mut self, topic_id: &ExternalId, phrase: Phrase, name: &str) -> Result<()> { |
| 218 | let paths = self.index.synonyms.entry(phrase).or_default(); |
| 219 | |
| 220 | paths.insert(SynonymEntry { |
| 221 | name: name.to_owned(), |
| 222 | id: topic_id.to_owned(), |
| 223 | }); |
| 224 | |
| 225 | Ok(()) |
| 226 | } |
| 227 | |
| 228 | pub fn full_matches(&self, phrase: &Phrase) -> Result<BTreeSet<SynonymEntry>> { |
| 229 | Ok(self.index.full_matches(phrase)) |
no test coverage detected