enable search with get route

This commit is contained in:
mpostma
2021-02-16 15:54:07 +01:00
parent f175d20599
commit e1253b6969
4 changed files with 86 additions and 25 deletions

View File

@ -1,7 +1,7 @@
mod search;
mod updates;
pub use search::{SearchQuery, SearchResult};
pub use search::{SearchQuery, SearchResult, DEFAULT_SEARCH_LIMIT};
use std::fs::create_dir_all;
use std::ops::Deref;
@ -28,7 +28,7 @@ impl Deref for Data {
#[derive(Clone)]
pub struct DataInner {
pub index_controller: Arc<LocalIndexController>,
api_keys: ApiKeys,
pub api_keys: ApiKeys,
options: Opt,
}

View File

@ -11,7 +11,7 @@ use serde_json::{Value, Map};
use crate::index_controller::IndexController;
use super::Data;
const DEFAULT_SEARCH_LIMIT: usize = 20;
pub const DEFAULT_SEARCH_LIMIT: usize = 20;
const fn default_search_limit() -> usize { DEFAULT_SEARCH_LIMIT }