Skip to content

Support facet search and prefix search settings #680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 11, 2025
Merged
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
36 changes: 36 additions & 0 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,42 @@ reset_proximity_precision_settings_1: |-
.reset_proximity_precision()
.await
.unwrap();
get_facet_search_settings_1: |-
let facet_search: bool = client
.index(INDEX_UID)
.get_facet_search()
.await
.unwrap();
update_facet_search_settings_1: |-
let task: TaskInfo = client
.index(INDEX_UID)
.set_facet_search(false)
.await
.unwrap();
reset_facet_search_settings_1: |-
let task: TaskInfo = client
.index(INDEX_UID)
.reset_facet_search()
.await
.unwrap();
get_prefix_search_settings_1: |-
let prefix_search: PrefixSearchSettings = client
.index(INDEX_UID)
.get_prefix_search()
.await
.unwrap();
update_prefix_search_settings_1: |-
let task: TaskInfo = client
.index(INDEX_UID)
.set_prefix_search(PrefixSearchSettings::Disabled)
.await
.unwrap();
reset_prefix_search_settings_1: |-
let task: TaskInfo = client
.index(INDEX_UID)
.reset_prefix_search()
.await
.unwrap();
facet_search_1: |-
let res = client.index("books")
.facet_search("genres")
Expand Down
7 changes: 6 additions & 1 deletion src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ impl AsRef<KeyBuilder> for KeyBuilder {
}
}

#[derive(Debug, Copy, Clone, Eq, PartialEq, Serialize, Deserialize)]
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
pub enum Action {
/// Provides access to everything.
#[serde(rename = "*")]
Expand Down Expand Up @@ -713,8 +713,13 @@ pub enum Action {
/// Provides access to the [delete key](https://www.meilisearch.com/docs/reference/api/keys#delete-a-key) endpoint.
#[serde(rename = "keys.delete")]
KeyDelete,
/// Provides access to chat completions endpoints.
#[serde(rename = "chatCompletions")]
ChatCompletions,
/// Any other value that might be added to Meilisearch in the future but that is not supported by this SDK.
/// If you see one, please open a PR
#[serde(untagged)]
Unknown(String),
}

#[derive(Debug, Clone, Deserialize)]
Expand Down
Loading