use std::path::PathBuf; use tokio::sync::oneshot; use uuid::Uuid; use super::{IndexMeta, IndexSettings, Result, UpdateResult}; use crate::index::{Document, SearchQuery, SearchResult, Settings}; use crate::index_controller::{updates::Processing, UpdateMeta}; pub enum IndexMsg { CreateIndex { uuid: Uuid, primary_key: Option, ret: oneshot::Sender>, }, Update { meta: Processing, data: std::fs::File, ret: oneshot::Sender>, }, Search { uuid: Uuid, query: SearchQuery, ret: oneshot::Sender>, }, Settings { uuid: Uuid, ret: oneshot::Sender>, }, Documents { uuid: Uuid, attributes_to_retrieve: Option>, offset: usize, limit: usize, ret: oneshot::Sender>>, }, Document { uuid: Uuid, attributes_to_retrieve: Option>, doc_id: String, ret: oneshot::Sender>, }, Delete { uuid: Uuid, ret: oneshot::Sender>, }, GetMeta { uuid: Uuid, ret: oneshot::Sender>, }, UpdateIndex { uuid: Uuid, index_settings: IndexSettings, ret: oneshot::Sender>, }, Snapshot { uuid: Uuid, path: PathBuf, ret: oneshot::Sender>, }, }