Options
All
  • Public
  • Public/Protected
  • All
Menu

Strict equality operator. Will match if the field has the exact same value as the input. Can be used with keyword fields and different types, but it is not recommended to use it with date and datetime fields as an exact timestamp match would be required. For timestamps use EqualsDate or {@link EqualsDateTime} instead.

Hierarchy

Index

Constructors

Properties

INPUT_PLACEHOLDER: "" = ''

Represents the placeholder "block" in operator display names.

Accessors

  • get numberOfOperands(): number

Methods

  • checkArgumentsCount(args: any[]): void
  • createQuery(elasticKeywords: string[], args: (string | number)[], escapeArgs?: boolean): Query
  • Simple implementation of query generation. Will not be suitable for all Operator derivatives.

    Escapes the first argument from the args array, calls the [query()]{@link Operator#query} function for each keyword and combines the results with an OR operator.

    Parameters

    • elasticKeywords: string[]
    • args: (string | number)[]
    • escapeArgs: boolean = true

    Returns Query

    query that wos constructed with the given arguments and keywords. Returns an empty query if no arguments are provided.

  • getOperatorNameTemplate(): string[]
  • serialize(): string
  • forEachKeyword(elasticKeywords: string[], queryConstructor: ((keyword: string) => Query)): Query
  • query(elasticKeyword: string, arg: string, operator: string): string
  • Creates a Query string query string literal with the provided arguments.

    Parameters

    • elasticKeyword: string

      Elasticsearch index keyword for the field you want to query

    • arg: string

      The value that you want to query the property for

    • operator: string

      The operator you want to use to query the indexed field. Consult the Elasticsearch's documentation for more information.

    Returns string

    combines the input strings by this pattern: ([elasticKeyword]:[operator][arg])

  • wrapInputWithQuotes(input: string, forceWrap?: boolean): WrapResult

Generated using TypeDoc