Pure document construction and filter-key conversion for search.
Key functions:
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.
(build-document* definition entity-id field-values & [opts])Construct a SearchDocument from a SearchDefinition and field values using explicit runtime inputs.
Distributes field values to the correct weight buckets (A/B/C/D). Concatenates all text into :content-all for fallback LIKE search.
Args: definition - SearchDefinition map entity-id - UUID field-values - map of field-name -> string or seq value Seqs are joined with a space. opts - map with required :id and :updated-at, optional :metadata
Returns: SearchDocument map ready for ISearchStore.upsert-document!
Construct a SearchDocument from a SearchDefinition and field values using explicit runtime inputs.
Distributes field values to the correct weight buckets (A/B/C/D).
Concatenates all text into :content-all for fallback LIKE search.
Args:
definition - SearchDefinition map
entity-id - UUID
field-values - map of field-name -> string or seq value
Seqs are joined with a space.
opts - map with required :id and :updated-at, optional :metadata
Returns:
SearchDocument map ready for ISearchStore.upsert-document!(filter-key->json-key k)Convert a filter keyword to a snake_case JSON object key.
:tenant-id -> "tenant_id" :status -> "status"
Used consistently by both build-document (storage) and the SQL query builders (retrieval) so that stored and queried keys always match.
Convert a filter keyword to a snake_case JSON object key. :tenant-id -> "tenant_id" :status -> "status" Used consistently by both build-document (storage) and the SQL query builders (retrieval) so that stored and queried keys always match.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |