The "prefix" argument tells us which repo to look in. The "prefix" in the method name alludes to the prefix scan that is done to find matching synonyms.
(
&self,
repo_id: RepoId,
token: &Phrase,
)
| 333 | // The "prefix" argument tells us which repo to look in. The "prefix" in the method name |
| 334 | // alludes to the prefix scan that is done to find matching synonyms. |
| 335 | pub fn search_token_prefix_matches( |
| 336 | &self, |
| 337 | repo_id: RepoId, |
| 338 | token: &Phrase, |
| 339 | ) -> Result<HashSet<SearchEntry>> { |
| 340 | let key = repo_id.index_key(token)?; |
| 341 | let index = key.search_index(self, IndexType::Search, IndexMode::ReadOnly)?; |
| 342 | Ok(index.prefix_matches(token)) |
| 343 | } |
| 344 | |
| 345 | pub fn view_stats(&self, repo_id: RepoId) -> Result<RepoStats> { |
| 346 | self.view(repo_id)?.stats() |
no test coverage detected