Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat: change opensearch highlight type to plain (#179)
gbirman8defc7af4d03
diff --git a/rust/cloud-storage/opensearch_client/src/search/builder.rs b/rust/cloud-storage/opensearch_client/src/search/builder.rsindex b7b593817f..be1ae45631 100644--- a/rust/cloud-storage/opensearch_client/src/search/builder.rs+++ b/rust/cloud-storage/opensearch_client/src/search/builder.rs@@ -70,7 +70,7 @@ pub trait SearchQueryConfig {Highlight::new().require_field_match(true).field("content",HighlightField::new()- .highlight_type("unified")+ .highlight_type("plain").pre_tags(vec![MacroEm::Open.to_string()]).post_tags(vec![MacroEm::Close.to_string()]).number_of_fragments(500),@@ -222,7 +222,7 @@ impl<T: SearchQueryConfig> SearchQueryBuilder<T> {SearchOn::Name => Highlight::new().require_field_match(true).field(T::TITLE_KEY,HighlightField::new()- .highlight_type("unified")+ .highlight_type("plain").pre_tags(vec![MacroEm::Open.to_string()]).post_tags(vec![MacroEm::Close.to_string()]).number_of_fragments(1),@@ -232,7 +232,7 @@ impl<T: SearchQueryConfig> SearchQueryBuilder<T> {.field(T::TITLE_KEY,HighlightField::new()- .highlight_type("unified")+ .highlight_type("plain").pre_tags(vec![MacroEm::Open.to_string()]).post_tags(vec![MacroEm::Close.to_string()]).number_of_fragments(1),@@ -240,7 +240,7 @@ impl<T: SearchQueryConfig> SearchQueryBuilder<T> {.field(T::CONTENT_KEY,HighlightField::new()- .highlight_type("unified")+ .highlight_type("plain").pre_tags(vec![MacroEm::Open.to_string()]).post_tags(vec![MacroEm::Close.to_string()]).number_of_fragments(1),diff --git a/rust/cloud-storage/opensearch_client/src/search/builder/test.rs b/rust/cloud-storage/opensearch_client/src/search/builder/test.rsindex 9f6ddd3e11..1c9ffbf7ad 100644--- a/rust/cloud-storage/opensearch_client/src/search/builder/test.rs+++ b/rust/cloud-storage/opensearch_client/src/search/builder/test.rs@@ -79,13 +79,13 @@ fn test_build_search_request() -> anyhow::Result<()> {"require_field_match": false,"fields": {"content": {- "type": "unified",+ "type": "plain","number_of_fragments": 1,"pre_tags": ["<macro_em>"],"post_tags": ["</macro_em>"],},"test_title": {- "type": "unified",+ "type": "plain","number_of_fragments": 1,"pre_tags": ["<macro_em>"],"post_tags": ["</macro_em>"],@@ -148,13 +148,13 @@ fn test_build_search_request() -> anyhow::Result<()> {"require_field_match": false,"fields": {"content": {- "type": "unified",+ "type": "plain","number_of_fragments": 1,"pre_tags": ["<macro_em>"],"post_tags": ["</macro_em>"],},"test_title": {- "type": "unified",+ "type": "plain","number_of_fragments": 1,"pre_tags": ["<macro_em>"],"post_tags": ["</macro_em>"],diff --git a/rust/cloud-storage/opensearch_client/src/search/projects.rs b/rust/cloud-storage/opensearch_client/src/search/projects.rsindex d56ee3837b..5d0273931d 100644--- a/rust/cloud-storage/opensearch_client/src/search/projects.rs+++ b/rust/cloud-storage/opensearch_client/src/search/projects.rs@@ -29,7 +29,7 @@ impl SearchQueryConfig for ProjectSearchConfig {.field(Self::TITLE_KEY,HighlightField::new()- .highlight_type("unified")+ .highlight_type("plain").number_of_fragments(1).pre_tags(vec![MacroEm::Open.to_string()]).post_tags(vec![MacroEm::Close.to_string()]),