Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QueryPipeline

QueryPipeline is a client for running query pipelines on a collection. See QueryPipeline.search for more details.

Create a new QueryPipeline via Client.pipeline.

// const client = new Client(...);
const pipeline = client.pipeline("website");

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    • client: Client
    • name: string
    • Optional version: undefined | string

    Returns QueryPipeline

Properties

Private client

client: Client

Readonly identifier

identifier: PipelineIdentifier

Methods

Protected emit

  • emit(event: string, ...data: any): void
  • Parameters

    • event: string
    • Rest ...data: any

    Returns void

on

search

  • Search runs a search query defined by a pipeline with the given values and session configuration.

    pipeline.search({ q: "<search query>" })
     .then(([response, values]) => {
       // handle response
     })
     .catch(error => {
       // handle error
    })

    Parameters

    Returns Promise<[SearchResponse, Record<string, string>]>

Generated using TypeDoc