Skip to content

Commit

Permalink
chore: update search limit
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Oct 1, 2023
1 parent ef6c4f6 commit a3e3c4f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 49 deletions.
94 changes: 47 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "writing"
version = "1.0.4"
version = "1.0.5"
edition = "2021"
rust-version = "1.64"
description = ""
Expand Down
3 changes: 2 additions & 1 deletion src/db/meili.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ impl MeiliSearch {
Space::Pub(some_gid) => (SearchQuery::new(&self.ipublication), some_gid),
};

sq.with_query(q).with_limit(10);
let limit = if q.is_empty() { 1000 } else { 20 };
sq.with_query(q).with_limit(limit);
let mut filters: Vec<&str> = Vec::new();
let f = if let Some(gid) = gid {
format!("gid = {}", gid)
Expand Down

0 comments on commit a3e3c4f

Please sign in to comment.