mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
fix database options
This commit is contained in:
parent
382e300326
commit
2e3a765dac
6 changed files with 37 additions and 26 deletions
|
@ -6,6 +6,7 @@ use std::time::Duration;
|
|||
use actix_web::{http::StatusCode, test};
|
||||
use meilisearch_http::data::Data;
|
||||
use meilisearch_http::option::Opt;
|
||||
use meilisearch_core::DatabaseOptions;
|
||||
use tempdir::TempDir;
|
||||
use tokio::time::delay_for;
|
||||
|
||||
|
@ -14,11 +15,16 @@ pub struct Server {
|
|||
data: Data,
|
||||
}
|
||||
|
||||
const DB_OPTS: DatabaseOptions = DatabaseOptions {
|
||||
main_map_size: 100 * 1024 * 1024 * 1024,
|
||||
update_map_size: 100 * 1024 * 1024 * 1024,
|
||||
};
|
||||
|
||||
impl Server {
|
||||
pub fn with_uid(uid: &str) -> Server {
|
||||
let tmp_dir = TempDir::new("meilisearch").unwrap();
|
||||
|
||||
let default_db_options = meilisearch_core::DatabaseOptions::default();
|
||||
let default_db_options = DB_OPTS;
|
||||
|
||||
let opt = Opt {
|
||||
db_path: tmp_dir.path().to_str().unwrap().to_string(),
|
||||
|
@ -34,7 +40,7 @@ impl Server {
|
|||
|
||||
Server {
|
||||
uid: uid.to_string(),
|
||||
data: data,
|
||||
data,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue