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
opensearch_query_builder
What it is
Part of the Search feature. Type-safe builders for OpenSearch query DSL
and request bodies (bool, match, range, nested, terms, function_score,
...), each implementing ToOpenSearchJson, used by opensearch_client.
Start here
src/lib.rs: theToOpenSearchJsontrait and the public re-exports — the crate's whole surface.src/query/: one file per query type.src/request.rs+src/request/: sort, highlight, collapse, and aggregation request fragments.
Scope
- Owns: building valid OpenSearch JSON query/request bodies from typed Rust structs.
- Not here: knowing which entity fields to query or how to index documents
→
opensearch_client.
Boundaries
- Used by:
opensearch_clientonly.
Recipes
- Add a new query type:
src/query/<name>.rs(struct + builder +impl ToOpenSearchJson) →pub useit insrc/lib.rs→src/query.rsmodule declaration.
Checks
cargo test -p opensearch_query_builder(SQLX_OFFLINEunset).docker-compose.ymlhere starts a local OpenSearch forexamples/.
Related
- Docs:
README.md,examples/