Options
All
  • Public
  • Public/Protected
  • All
Menu

Range operator for indexed fields that store a date in timestamp format.

Will create a range query that matches every timestamp from the midnight of the first day (included) to the midnight of the day after the second day (excluded).

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: Moment[]): Query
  • Creates a query as specified by the classes documentation. See [super.createQuery()]{@link Operator#createQuery} for more information.

    Parameters

    • elasticKeywords: string[]

      keywords of the fields that should be queried. If more than one is provided then queries for every keyword will be generated and combined with an OR operator.

    • args: Moment[]

      start and end date for the range. Any time information will be ignored use {@link InRangeDateTime} if you want a date time query instead. The two dates must be in ascending order, if not the behavior is undefined.

    Returns Query

  • 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