Deprecated: a process-global registry of search index definitions.
Hand definitions to :wagoe/search instead — under :indexes in config or
a module's :search part — and bind them with
wagoe.search.core.index/defsearch. The search service still reads this
registry for an id its component does not hold, and logs once per such id.
Key functions:
Deprecated: a process-global registry of search index definitions. Hand definitions to `:wagoe/search` instead — under `:indexes` in config or a module's `:search` part — and bind them with `wagoe.search.core.index/defsearch`. The search service still reads this registry for an id its component does not hold, and logs once per such id. 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)
(clear-registry!)Remove all registered definitions. Use in test fixtures.
Returns: nil
Remove all registered definitions. Use in test fixtures. Returns: nil
(defsearch var-name definition)Deprecated: use wagoe.search.core.index/defsearch and hand the var to :wagoe/search.
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)
Deprecated: use wagoe.search.core.index/defsearch and hand the var to
:wagoe/search.
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)(fallback index-id)The definition registered for index-id, or nil. Logs a deprecation
warning the first time it finds each one, so every index left to move is named.
The definition registered for `index-id`, or nil. Logs a deprecation warning the first time it finds each one, so every index left to move is named.
(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
(list-searches)List all registered search index ids.
Returns: Vector of keyword ids
List all registered search index ids. Returns: Vector of keyword ids
(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
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 |