From e7b3e3527a092629cc01b56a2e884ca9a23b9b8d Mon Sep 17 00:00:00 2001 From: sourcepirate Date: Sat, 5 Sep 2020 23:58:59 +0800 Subject: [PATCH] formated the searcher.rs file --- src/searcher.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/searcher.rs b/src/searcher.rs index 6ea2952..282fb85 100644 --- a/src/searcher.rs +++ b/src/searcher.rs @@ -104,7 +104,7 @@ impl Searcher { _py: Python, query: &Query, limit: usize, - offset: usize, + offset: usize, count: bool, order_by_field: Option<&str>, ) -> PyResult { @@ -119,8 +119,9 @@ impl Searcher { let (mut multifruit, hits) = { if let Some(order_by) = order_by_field { let field = get_field(&self.inner.index().schema(), order_by)?; - let collector = - TopDocs::with_limit(limit).and_offset(offset).order_by_u64_field(field); + let collector = TopDocs::with_limit(limit) + .and_offset(offset) + .order_by_u64_field(field); let top_docs_handle = multicollector.add_collector(collector); let ret = self.inner.search(&query.inner, &multicollector);