Liking cljdoc? Tell your friends :D

wagoe.search.shell.registry

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)
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)
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)

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)
sourceraw docstring

fallbackclj

(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.
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