Related links
Method & sources
- Primary: Official Typesense docs (API reference + feature guides), favoring versioned pages. Inline citations use bracketed labels (e.g., [TS‑SearchParams]). See Sources for URLs.
- Cross‑checks: When behavior seemed ambiguous, we verified across Search Parameters, Faceting, and Feature pages.
- Versioning: When docs do not specify version gates, we mark as TBD.
Capability tables
Each table lists exact server parameter names, constraints, interactions, proposed DSL shape (additive/back‑compat), compiler mapping, and ship bucket.1) Union (logical OR across collections/queries)
Notes: In Typesense, “union” is not a first‑class server feature; client must aggregate multi‑search responses. [TS‑MultiSearch]
2) Synonyms / Stopwords (management + query‑time switches)
Notes: Per‑query enable/disable flags for synonyms/stopwords are not documented; treat as index‑time configuration. [TS‑Synonyms] [TS‑Stopwords]
3) Highlighting controls
Validation: disallow both
include_fields and exclude_fields hiding all highlighted fields; hint with [Error UX] to enable specific fields. [TS‑SearchParams]
4) Advanced faceting
5) Geo — Shipped
Geo search is now fully implemented. See the Geo Search guide for DSL reference, configuration, and examples.
6) Vectors / AI (vector fields, ANN params, hybrid) — Shipped
Vector search is now fully implemented. See the Vector Search guide for DSL reference, configuration, and examples.
7) Hit limits (caps, per‑group limits, pagination interactions)
Recommendations
-
Now (ship in this bucket)
- Highlighting controls: 1:1 param mapping; low risk; straightforward compile‑time validation. Add DX redaction for highlighted snippets in logs. Minimal DSL:
highlight(fields:, full_fields:, affix_tokens:, start_tag:, end_tag:). - Basic faceting controls:
facet_by,max_facet_values,facet_query. Minimal DSL:facet(by:, max_values:, query:). Tests: compile mapping + param validation. - Hit limits & pagination:
per_page,page,group_by,group_limit,exhaustive_search,search_cutoff_ms. Minimal DSL:limit,group,exhaustive,cutoff_ms. Tests: pagination math + grouping interactions.
- Highlighting controls: 1:1 param mapping; low risk; straightforward compile‑time validation. Add DX redaction for highlighted snippets in logs. Minimal DSL:
-
Later (defer)
- Union across collections: requires client‑side merge/dedupe policy and observability; define deterministic interleaving before shipping. Prereq: merge policy & perf guardrails. Unknowns: cross‑search ranking.
- Synonyms/Stopwords management: scope belongs to admin/CLI; wire separately from Relation DSL. Add doctor checks and docs; no query‑time flag exposed in docs today.
Geo: Shipped. See Geo Search.Vectors/Hybrid: Shipped. See Vector Search.- Advanced faceting extras (nested/sampling/custom sort): out of scope until server primitives exist.
-
- Config kill‑switches:
config.features.highlighting,config.features.faceting,config.features.grouping,config.features.exhaustive_search(default off for new features). - Presets: ship safe defaults aligned with server (e.g.,
affix_tokens=4,max_facet_values=10,page=1,per_page=10). - Observability: when active, log feature flags and normalized params into our instrumentation events (see Observability).
- Config kill‑switches:
Open questions & risk register
Per capability:-
- Open: How do we interleave/dedupe results deterministically across searches? What’s the pagination model? [TS‑MultiSearch]
- Risk: M — correctness/perf of client‑side merge. Mitigation: stable policy + benchmarks + feature flag.
-
- Open: Any per‑query enable/disable flags? If not, should we simulate via presets? [TS‑Synonyms] [TS‑Stopwords]
- Risk: M — admin surface creep in query DSL. Mitigation: keep in CLI/admin; add doctor checks.
-
- Open: Confirm defaults per server version for
highlight_affix_num_tokens. [TS‑SearchParams] - Risk: L — payload size/perf. Mitigation: conservative defaults and size logging.
- Open: Confirm defaults per server version for
-
- Open: Are nested/sampled facets planned server‑side? [TS‑Faceting]
- Risk: M — API churn if we guess semantics. Mitigation: reserve DSL names; do not compile until server supports.
-
Geo — Resolved. Shipped with full DSL:
where_geo,order_geo,order_eval,geo_distance_meters,:geopointschema type. See Geo Search. -
Vectors/Hybrid — Resolved. Shipped with full DSL:
embeddingmacro,vector_search,find_similar, hybrid alpha weighting, auto‑exclude, redaction. See Vector Search. -
- Open: Interactions between
group_limit,group_by, andper_pageacross edge cases; clarifyexhaustive_searchsemantics withsearch_cutoff_ms. [TS‑Pagination] - Risk: L — UX confusion. Mitigation: compile‑time hints and cookbook examples.
- Open: Interactions between
Migration & documentation plan
- YARD earmarks: add short docstrings for new public DSL entry points (
highlight,facet,limit,group,exhaustive,cutoff_ms) describing param mapping and defaults. - Docs: link this memo from project index; add anchors in Relation Guide and examples in Cookbook Queries for highlighting/faceting/pagination.
- CLI/doctor: add checks that surface misconfigurations (e.g., requesting highlight on non‑indexed fields;
group_limit>per_page). - Observability: extend event payload to include normalized feature flags and redacted values.
Sources
- [TS‑SearchParams] Typesense — Search Parameters (versioned):
https://typesense.org/docs/29.0/api/search.html - [TS‑Faceting] Typesense — Faceting (on Search Parameters page):
https://typesense.org/docs/29.0/api/search.html#faceting - [TS‑Highlight] Typesense — Highlighting (on Search Parameters page):
https://typesense.org/docs/29.0/api/search.html#highlighting - [TS‑Pagination] Typesense — Pagination (on Search Parameters page):
https://typesense.org/docs/29.0/api/search.html#pagination - [TS‑Grouping] Typesense — Grouping results:
https://typesense.org/docs/29.0/api/search.html#grouping - [TS‑MultiSearch] Typesense — Multi‑Search API:
https://typesense.org/docs/29.0/api/multi-search.html - [TS‑Synonyms] Typesense — Synonyms API:
https://typesense.org/docs/29.0/api/synonyms.html - [TS‑Stopwords] Typesense — Stopwords API:
https://typesense.org/docs/29.0/api/stopwords.html - [TS‑FieldTypes] Typesense — Field types (
geopoint):https://typesense.org/docs/29.0/api/field-types.html - [TS‑Geo] Typesense — Geo search (see Search Parameters and guides):
https://typesense.org/docs/29.0/api/search.html#geosearch - [TS‑Vector] Typesense — Vector Search:
https://typesense.org/docs/29.0/api/vector-search.html