Options
All
  • Public
  • Public/Protected
  • All
Menu

A batch indexer allows you to automatically batch document indexing in pipelines, flushing it every N documents.

Hierarchy

  • BatchIndexer

Index

Constructors

constructor

Properties

Private chunkSize

chunkSize: number

Private client

client: Client

Private pipeline

pipeline: Redis

Methods

addDocuments

  • addDocuments<T>(docs: BatchDoc<T>[], noSave?: boolean, replace?: boolean, partial?: boolean): Promise<"OK">
  • Add multiple documents via Redis pipelining

    Type parameters

    Parameters

    • docs: BatchDoc<T>[]

      array of objects containing document related properties (score defaults to 1.0 if omitted)

    • Default value noSave: boolean = false
    • Default value replace: boolean = false
    • Default value partial: boolean = false

    Returns Promise<"OK">

Private commit

  • commit(): Promise<any>
  • Manually commit and flush the batch indexing query

    Returns Promise<any>

Private partialAddDoc

  • partialAddDoc<T>(noSave: boolean, replace: boolean, partial: boolean): (Anonymous function)
  • Type parameters

    • T

    Parameters

    • noSave: boolean
    • replace: boolean
    • partial: boolean

    Returns (Anonymous function)

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc