diff --git a/backend/canisters/community/CHANGELOG.md b/backend/canisters/community/CHANGELOG.md index f82f86b8f6..52a815cf32 100644 --- a/backend/canisters/community/CHANGELOG.md +++ b/backend/canisters/community/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Introduce community `MembersMap` in prep for move to stable memory ([#6966](https://github.com/open-chat-labs/open-chat/pull/6966)) - Migrate community members to stable memory ([#6967](https://github.com/open-chat-labs/open-chat/pull/6967)) - Check bot + user permissions when issuing JWT ([#6970](https://github.com/open-chat-labs/open-chat/pull/6970)) +- Reduce size of search index when serialized ([#6973](https://github.com/open-chat-labs/open-chat/pull/6973)) ### Removed diff --git a/backend/canisters/group/CHANGELOG.md b/backend/canisters/group/CHANGELOG.md index f17b33f01d..a8239f827a 100644 --- a/backend/canisters/group/CHANGELOG.md +++ b/backend/canisters/group/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Re-run member migration to stable memory using reduced size format ([#6965](https://github.com/open-chat-labs/open-chat/pull/6965)) - Check bot + user permissions when issuing JWT ([#6970](https://github.com/open-chat-labs/open-chat/pull/6970)) +- Reduce size of search index when serialized ([#6973](https://github.com/open-chat-labs/open-chat/pull/6973)) ## [[2.0.1491](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1491-group)] - 2024-12-03 diff --git a/backend/canisters/user/CHANGELOG.md b/backend/canisters/user/CHANGELOG.md index 3e0d7cbba2..cf61ed043c 100644 --- a/backend/canisters/user/CHANGELOG.md +++ b/backend/canisters/user/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Remove chat event updates after 31 days ([#6916](https://github.com/open-chat-labs/open-chat/pull/6916)) - Make `StableMemoryMap` use strongly typed keys ([#6937](https://github.com/open-chat-labs/open-chat/pull/6937)) - Disallow sending prize messages to threads ([#6960](https://github.com/open-chat-labs/open-chat/pull/6960)) +- Reduce size of search index when serialized ([#6973](https://github.com/open-chat-labs/open-chat/pull/6973)) ### Removed diff --git a/backend/libraries/search/src/lib.rs b/backend/libraries/search/src/lib.rs index 88e4c88fd5..10282fcbea 100644 --- a/backend/libraries/search/src/lib.rs +++ b/backend/libraries/search/src/lib.rs @@ -7,7 +7,9 @@ pub struct Query { #[derive(Serialize, Deserialize)] pub struct Token { + #[serde(rename = "v", alias = "value")] pub value: String, + #[serde(rename = "l", alias = "value_lower")] pub value_lower: String, } @@ -31,7 +33,9 @@ impl Query { #[derive(Serialize, Deserialize)] pub struct Field { + #[serde(rename = "t", alias = "tokens")] tokens: Vec, + #[serde(rename = "w", alias = "weight")] weight: f32, } @@ -46,6 +50,7 @@ impl Field { #[derive(Serialize, Deserialize, Default)] pub struct Document { + #[serde(rename = "f", alias = "fields")] fields: Vec, }