Class ElasticIndexService<T>Abstract

abstarct class: ElasticIndexService

  • abstract class for basic Elasticsearch CRUD operations
  • common operations that are shared across different versions. TODO - support Elastic and OpenSearch

Type Parameters

Hierarchy

Constructors

Properties

_client: Client
_options: ElasticOption

Accessors

Methods

  • push item for time-series data

    Parameters

    • item: T

      item to push

    • Optional type: string

      document type

    Returns Promise<T>

  • read item with projections

    Parameters

    • id: string

      item id

    • Optional views: object | string[]

      projections

    Returns Promise<T>

  • save an item

    Parameters

    • id: string

      item id

    • item: T

      item to save

    • Optional type: string

      document type

    Returns Promise<T>

  • search and return formatted response

    Parameters

    • body: any

      search query

    • Optional searchType: string

      type of search

    Returns Promise<any>

  • search raw results using a query body

    Type Parameters

    • T extends object = any

    Parameters

    • body: any

      search query

    • Optional searchType: string

      type of search

    Returns Promise<T>

  • update an item

    Parameters

    • id: string

      item id

    • item: T

      item to update

    • Optional increments: any

      fields to increment

    • Optional options: { maxRetries?: number }
      • Optional maxRetries?: number

    Returns Promise<T>

Generated using TypeDoc