| 254 | } |
| 255 | |
| 256 | pub async fn search( |
| 257 | &self, |
| 258 | parent_topic: &git::Topic, |
| 259 | search: &git::Search, |
| 260 | ) -> Result<git::FindMatchesResult> { |
| 261 | log::debug!("search: {:?}", search); |
| 262 | |
| 263 | let fetcher = git::RedisFetchDownSet { |
| 264 | client: Arc::clone(&self.git), |
| 265 | redis: Arc::clone(&self.redis), |
| 266 | }; |
| 267 | |
| 268 | git::FindMatches { |
| 269 | context_repo_id: parent_topic.key.1.to_owned(), |
| 270 | limit: 100, |
| 271 | locale: Locale::EN, |
| 272 | recursive: true, |
| 273 | search: search.to_owned(), |
| 274 | timespec: Timespec, |
| 275 | topic_id: parent_topic.key.0.to_owned(), |
| 276 | viewer: Arc::clone(&self.viewer), |
| 277 | } |
| 278 | .call(&self.git, &fetcher) |
| 279 | } |
| 280 | |
| 281 | pub async fn search_topics( |
| 282 | &self, |