mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
add distinct attributes to cli
This commit is contained in:
parent
49fbbacafc
commit
bbb6728d2f
2 changed files with 12 additions and 0 deletions
|
@ -469,6 +469,8 @@ struct SettingsUpdate {
|
|||
criteria: Option<Vec<String>>,
|
||||
#[structopt(long)]
|
||||
exact_attributes: Option<Vec<String>>,
|
||||
#[structopt(long)]
|
||||
distinct_attribute: Option<String>,
|
||||
}
|
||||
|
||||
impl Performer for SettingsUpdate {
|
||||
|
@ -503,6 +505,14 @@ impl Performer for SettingsUpdate {
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(distinct_attr) = self.distinct_attribute {
|
||||
if !distinct_attr.is_empty() {
|
||||
update.set_distinct_field(distinct_attr);
|
||||
} else {
|
||||
update.reset_distinct_field();
|
||||
}
|
||||
}
|
||||
|
||||
let mut bars = Vec::new();
|
||||
let progesses = MultiProgress::new();
|
||||
for _ in 0..4 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue