Options
All
  • Public
  • Public/Protected
  • All
Menu

An operator that can be used on any field and matches entries with null or empty string values.

Beware that if any additional constraints should be applied to the generated query the results may behave strangely. Consult the [createQueryWithConstraint()]{@link IsNull#createQueryWithConstraint} method for more information.

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[]): Query
  • createQueryWithConstraint(elasticKeywords: string[], constraint: Query): Query
  • Counterintuitively elasticsearch query string queries behave weirdly when combining the queries with operators such as AND. Because of this the following query:

    (dataSet.text_0.value:"")

    returns an empty result set.

    But query that should be intuitively more constraining:

    (dataSet.text_0.value:"") AND (processId:600168ccf68fea5241ae5e62)
    

    will return a non empty and expected result.

    This method exists to combat this issue and add the, sometimes necessary, constraint into the query generated by this operator.

    Parameters

    • elasticKeywords: string[]

      the queried fields

    • constraint: Query

      a constraining query that is distributively applied into the query generated by this operator. If an empty query is provided the result will be the same as calling [createQuery()]{@link IsNull#createQuery}.

    Returns Query

    a query with distributively applied constraint query

  • emptyStringQueryString(elasticKeyword: string): string
  • getOperatorNameTemplate(): string[]
  • nullQueryString(elasticKeyword: string): 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