Liking cljdoc? Tell your friends :D

boundary.search.core.highlighting

Pure functions for search result highlighting and snippet extraction.

This namespace provides functions for highlighting matching terms in search results and extracting relevant snippets. All functions are pure (no side effects).

Architecture: Functional Core (Pure)

Pure functions for search result highlighting and snippet extraction.

This namespace provides functions for highlighting matching terms
in search results and extracting relevant snippets.
All functions are pure (no side effects).

Architecture: Functional Core (Pure)
raw docstring

boundary.search.core.index

Pure document construction and filter-key conversion for search.

Key functions:

  • build-document* — construct a SearchDocument from field values
  • filter-key->json-key — convert a filter keyword to a snake_case JSON key

The load-time index registry (defsearch, register-search!, get-search, list-searches, clear-registry!) is mutable process state and lives in the shell at boundary.search.shell.registry, keeping this namespace pure.

Pure document construction and filter-key conversion for search.

Key functions:
- build-document*       — construct a SearchDocument from field values
- filter-key->json-key  — convert a filter keyword to a snake_case JSON key

The load-time index registry (`defsearch`, `register-search!`, `get-search`,
`list-searches`, `clear-registry!`) is mutable process state and lives in the
shell at boundary.search.shell.registry, keeping this namespace pure.
raw docstring

boundary.search.core.query

Pure query-building functions for full-text search.

Two query paths:

  • PostgreSQL: to_tsvector/plainto_tsquery + ts_rank + ts_headline
  • Fallback (H2/SQLite): LOWER/LIKE-based search

Filter support: callers may pass a :filters map of keyword->string pairs. Filter values are matched against the JSON "filters" column using DB-appropriate JSON path syntax.

Pure query-building functions for full-text search.

Two query paths:
- PostgreSQL: to_tsvector/plainto_tsquery + ts_rank + ts_headline
- Fallback (H2/SQLite): LOWER/LIKE-based search

Filter support: callers may pass a :filters map of keyword->string pairs.
Filter values are matched against the JSON "filters" column using
DB-appropriate JSON path syntax.
raw docstring

boundary.search.core.ranking

Pure ranking and scoring functions for search results.

This namespace provides functions for calculating relevance scores, applying boosts, and normalizing results. All functions are pure.

Architecture: Functional Core (Pure)

Pure ranking and scoring functions for search results.

This namespace provides functions for calculating relevance scores,
applying boosts, and normalizing results. All functions are pure.

Architecture: Functional Core (Pure)
raw docstring

boundary.search.core.ui

Pure Hiccup UI components for the search Admin interface.

All functions are pure — they receive data and return Hiccup structures. No side effects, no I/O, no logging.

Components: field-weight-badge — weight indicator (A/B/C/D) search-result-row — single result row search-results-fragment — HTMX results area indices-page — list all registered indices (full page) index-detail-page — index config + live search test form (full page)

Pure Hiccup UI components for the search Admin interface.

All functions are pure — they receive data and return Hiccup structures.
No side effects, no I/O, no logging.

Components:
  field-weight-badge   — weight indicator (A/B/C/D)
  search-result-row    — single result row
  search-results-fragment — HTMX results area
  indices-page         — list all registered indices (full page)
  index-detail-page    — index config + live search test form (full page)
raw docstring

boundary.search.ports

Port definitions for the boundary-search library.

Three protocols cover the full lifecycle:

ISearchStore — low-level persistence (upsert, delete, search rows) ISearchEngine — high-level orchestration (index-document!, search, suggest) ISearchRegistry — in-process registry of defsearch definitions

Port definitions for the boundary-search library.

Three protocols cover the full lifecycle:

ISearchStore    — low-level persistence (upsert, delete, search rows)
ISearchEngine   — high-level orchestration (index-document!, search, suggest)
ISearchRegistry — in-process registry of defsearch definitions
raw docstring

boundary.search.schema

Malli schemas for the boundary-search library.

All internal data uses kebab-case keywords. snake_case conversion happens only at DB/HTTP boundaries.

Malli schemas for the boundary-search library.

All internal data uses kebab-case keywords.
snake_case conversion happens only at DB/HTTP boundaries.
raw docstring

boundary.search.shell.http

HTTP API routes and admin web UI handlers for boundary-search.

API Endpoints (mounted under /api/v1): POST /search/:index-id — search POST /search/:index-id/suggest — trigram suggestions POST /search/documents — index a document DELETE /search/documents/:type/:id — remove a document

Admin Web UI (mounted under /web/admin): GET /search — list all indices GET /search/:index-id — index detail + live search form POST /search/:index-id/search — HTMX search results fragment

HTTP API routes and admin web UI handlers for boundary-search.

API Endpoints (mounted under /api/v1):
  POST   /search/:index-id              — search
  POST   /search/:index-id/suggest      — trigram suggestions
  POST   /search/documents              — index a document
  DELETE /search/documents/:type/:id    — remove a document

Admin Web UI (mounted under /web/admin):
  GET    /search                        — list all indices
  GET    /search/:index-id              — index detail + live search form
  POST   /search/:index-id/search       — HTMX search results fragment
raw docstring

boundary.search.shell.module-wiring

Integrant lifecycle management for the search module.

Config keys:

:boundary/search {:db-ctx (ig/ref :boundary/db-context)}

Returns {:store <ISearchStore> :engine <ISearchEngine>}

:boundary/search-routes {:search-service (ig/ref :boundary/search)}

Returns {:api [...] :web [...] :static []} for composition by the HTTP handler.

Integrant lifecycle management for the search module.

Config keys:

:boundary/search
  {:db-ctx (ig/ref :boundary/db-context)}

  Returns {:store <ISearchStore> :engine <ISearchEngine>}

:boundary/search-routes
  {:search-service (ig/ref :boundary/search)}

  Returns {:api [...] :web [...] :static []} for composition
  by the HTTP handler.
raw docstring

No vars found in this namespace.

boundary.search.shell.persistence

Database persistence for search documents.

Implements ISearchStore using next.jdbc + HoneySQL for DML and raw parameterized SQL for FTS-specific queries.

Two query strategies selected by db-type:

  • :postgresql — to_tsvector/plainto_tsquery + ts_rank + ts_headline
  • :h2 / :sqlite — LOWER/LIKE fallback (used in tests and dev)
Database persistence for search documents.

Implements ISearchStore using next.jdbc + HoneySQL for DML
and raw parameterized SQL for FTS-specific queries.

Two query strategies selected by db-type:
- :postgresql — to_tsvector/plainto_tsquery + ts_rank + ts_headline
- :h2 / :sqlite — LOWER/LIKE fallback (used in tests and dev)
raw docstring

boundary.search.shell.registry

Load-time registry of search index definitions.

The registry is mutable process state, so it lives in the shell — the core (boundary.search.core.index) stays pure (document construction and filter-key conversion only). Definitions are registered at namespace load via the defsearch macro and read at runtime by the search service.

Key functions:

  • defsearch macro — define and register an index
  • register-search! — low-level registration
  • get-search — look up by index-id
  • list-searches — list registered index ids
  • clear-registry! — reset registry (test fixtures)
Load-time registry of search index definitions.

The registry is mutable process state, so it lives in the shell — the core
(boundary.search.core.index) stays pure (document construction and filter-key
conversion only). Definitions are registered at namespace load via the
`defsearch` macro and read at runtime by the search service.

Key functions:
- defsearch macro       — define and register an index
- register-search!      — low-level registration
- get-search            — look up by index-id
- list-searches         — list registered index ids
- clear-registry!       — reset registry (test fixtures)
raw docstring

boundary.search.shell.service

SearchService orchestrates document indexing and search queries.

Implements ISearchEngine by coordinating:

  • core/index — document construction
  • core/query — query sanitization
  • shell/registry — index definition registry
  • ISearchStore — persistence operations
SearchService orchestrates document indexing and search queries.

Implements ISearchEngine by coordinating:
- core/index     — document construction
- core/query     — query sanitization
- shell/registry — index definition registry
- ISearchStore   — persistence operations
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close