Liking cljdoc? Tell your friends :D

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

clear-registry!clj

(clear-registry!)

Remove all registered definitions. Use in test fixtures.

Returns: nil

Remove all registered definitions. Use in test fixtures.

Returns:
  nil
sourceraw docstring

defsearchcljmacro

(defsearch var-name definition)

Define a search index configuration and register it globally.

Binds a var and registers in the in-process search registry.

Example: (defsearch product-search {:id :product-search :entity-type :product :language :english :fields [{:name :title :weight :a} {:name :description :weight :b} {:name :tags :weight :c}] :options {:highlight? true :trigrams? true}})

This is equivalent to: (def product-search {...}) (register-search! product-search)

Define a search index configuration and register it globally.

Binds a var and registers in the in-process search registry.

Example:
  (defsearch product-search
    {:id          :product-search
     :entity-type :product
     :language    :english
     :fields      [{:name :title       :weight :a}
                   {:name :description :weight :b}
                   {:name :tags        :weight :c}]
     :options     {:highlight? true
                   :trigrams?  true}})

This is equivalent to:
  (def product-search {...})
  (register-search! product-search)
sourceraw docstring

(get-search index-id)

Retrieve a registered SearchDefinition by id.

Args: index-id - keyword

Returns: SearchDefinition map or nil

Retrieve a registered SearchDefinition by id.

Args:
  index-id - keyword

Returns:
  SearchDefinition map or nil
sourceraw docstring

list-searchesclj

(list-searches)

List all registered search index ids.

Returns: Vector of keyword ids

List all registered search index ids.

Returns:
  Vector of keyword ids
sourceraw docstring

register-search!clj

(register-search! definition)

Register a SearchDefinition in the global registry.

Args: definition - SearchDefinition map with :id keyword

Returns: :id keyword

Register a SearchDefinition in the global registry.

Args:
  definition - SearchDefinition map with :id keyword

Returns:
  :id keyword
sourceraw 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