mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
list settings
This commit is contained in:
parent
47138c7632
commit
17b84691f2
5 changed files with 70 additions and 47 deletions
|
@ -7,14 +7,15 @@ mod update_handler;
|
|||
|
||||
use std::path::Path;
|
||||
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
use futures::stream::StreamExt;
|
||||
use actix_web::web::Payload;
|
||||
use crate::index::{SearchResult, SearchQuery};
|
||||
use actix_web::web::Bytes;
|
||||
use actix_web::web::Payload;
|
||||
use anyhow::Context;
|
||||
use chrono::{DateTime, Utc};
|
||||
use crate::index::{SearchResult, SearchQuery};
|
||||
use futures::stream::StreamExt;
|
||||
use milli::update::{IndexDocumentsMethod, UpdateFormat};
|
||||
use serde::{Serialize, Deserialize};
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
use uuid::Uuid;
|
||||
|
||||
pub use updates::{Processed, Processing, Failed};
|
||||
|
@ -135,14 +136,6 @@ impl IndexController {
|
|||
todo!()
|
||||
}
|
||||
|
||||
fn swap_indices(&self, index1_uid: String, index2_uid: String) -> anyhow::Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn index(&self, name: String) -> anyhow::Result<Option<std::sync::Arc<milli::Index>>> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn update_status(&self, index: String, id: u64) -> anyhow::Result<Option<UpdateStatus>> {
|
||||
todo!()
|
||||
}
|
||||
|
@ -155,6 +148,15 @@ impl IndexController {
|
|||
todo!()
|
||||
}
|
||||
|
||||
pub async fn settings(&self, index: String) -> anyhow::Result<Settings> {
|
||||
let uuid = self.uuid_resolver
|
||||
.resolve(index.clone())
|
||||
.await?
|
||||
.with_context(|| format!("Index {:?} doesn't exist", index))?;
|
||||
let settings = self.index_handle.settings(uuid).await?;
|
||||
Ok(settings)
|
||||
}
|
||||
|
||||
fn update_index(&self, name: String, index_settings: IndexSettings) -> anyhow::Result<IndexMetadata> {
|
||||
todo!()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue