Options
All
  • Public
  • Public/Protected
  • All
Menu

A search topic created by the primary node.

Hierarchy

Index

Methods

deregister

  • deregister(name: string): Promise<void>
  • Deregister a search provider by its name.

    Parameters

    • name: string

      the name of the search provider to deregister

    Returns Promise<void>

disconnect

  • disconnect(): Promise<void>
  • Disconnect from the search topic. NOTE: All search providers registered by this search client will be deregistered.

    Returns Promise<void>

dispatch

  • dispatch(providerName: string, result: SearchResult, action: string): Promise<any>
  • Dispatch a search result back to the search provider. It is then the search providers duty to perform what ever action was chosen.

    Parameters

    • providerName: string

      the name of the search provider to send the search result back to.

    • result: SearchResult

      the search result to send back to the search provider.

    • action: string

      the action for the search provider to perform with the search result.

    Returns Promise<any>

getAllProviders

onSubscription

  • Add a subscription listener that will be called when ever a search client subscribes to this topic.

    Returning false in said listener will reject the request.

    Parameters

    Returns void

register

removeSubscriptionListener

  • Remove a subscription listener.

    Parameters

    Returns void

search

  • Execute a search on the search topic.

    The generator returned by this function can be called multiple times, returning the current list of search provider responses. As more search providers respond to the search request the returned list of responses will grow in length.

    When all the search providers have responded to the search request, the generator will return the final set of search response under the value attribute and set the 'done' attribute set to true.

    If no targets are included in request, will search against all search providers.

    experimental

    Parameters

    • request: SearchRequest

      the request object that contains parameters to base the search on.

    Returns Promise<SearchProviderResponseGeneratorExtended>

Legend

  • Property
  • Method

Generated using TypeDoc