diff --git a/src/rank/query_builder.rs b/src/rank/query_builder.rs index e6c49be6d..1dced5ba3 100644 --- a/src/rank/query_builder.rs +++ b/src/rank/query_builder.rs @@ -53,15 +53,15 @@ where D: Deref pub fn new(view: &'a DatabaseView) -> Result> { QueryBuilder::with_criteria(view, Criteria::default()) } + + pub fn with_criteria(view: &'a DatabaseView, criteria: Criteria) -> Result> { + Ok(QueryBuilder { view, criteria, filter: None }) + } } impl<'a, D, FI> QueryBuilder<'a, D, FI> where D: Deref, { - pub fn with_criteria(view: &'a DatabaseView, criteria: Criteria) -> Result> { - Ok(QueryBuilder { view, criteria, filter: None }) - } - pub fn with_filter(self, function: F) -> QueryBuilder<'a, D, F> where F: Fn(DocumentId, &DatabaseView) -> bool, {