implement create index

This commit is contained in:
mpostma 2021-02-08 10:47:34 +01:00
parent ed44e684cc
commit ec047eefd2
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
5 changed files with 69 additions and 22 deletions

View file

@ -127,7 +127,7 @@ pub trait IndexController {
fn update_settings<S: AsRef<str>>(&self, index_uid: S, settings: Settings) -> anyhow::Result<UpdateStatus>;
/// Create an index with the given `index_uid`.
fn create_index<S: AsRef<str>>(&self, index_uid: S) -> Result<()>;
fn create_index(&self, index_uid: impl AsRef<str>, primary_key: Option<impl AsRef<str>>) -> Result<IndexMetadata>;
/// Delete index with the given `index_uid`, attempting to close it beforehand.
fn delete_index<S: AsRef<str>>(&self, index_uid: S) -> Result<()>;