Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/index/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ pub enum IndexType {
Trie,
#[strum(serialize = "BITMAP")]
Bitmap,
#[strum(serialize = "INVERTED")]
Inverted,
#[strum(serialize = "AUTOINDEX")]
Auto,
}

#[derive(Debug, Clone, Copy, EnumString, Display)]
Expand Down
3 changes: 2 additions & 1 deletion src/mutate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ impl Client {
collection_name: S,
fields_data: Vec<FieldColumn>,
options: Option<InsertOptions>,
partial_update: bool,
) -> Result<crate::proto::milvus::MutationResult>
where
S: Into<String>,
Expand All @@ -213,7 +214,7 @@ impl Client {
fields_data: fields_data.into_iter().map(|f| f.into()).collect(),
hash_keys: Vec::new(),
schema_timestamp: 0,
partial_update: false,
partial_update,
})
.await?
.into_inner();
Expand Down
13 changes: 13 additions & 0 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,19 @@ impl FieldSchema {
max_length: 0,
}
}

pub fn new_json(name: &str, description: &str) -> Self {
Self {
name: name.to_owned(),
description: description.to_owned(),
dtype: DataType::Json,
is_primary: false,
auto_id: false,
chunk_size: 1,
dim: 1,
max_length: 0,
}
}
}

impl From<FieldSchema> for schema::FieldSchema {
Expand Down