ifnotexist

Purpose

Checks if the specified argument is absent in the document. If the specified argument is absent, the results of the second argument are returned.

Syntax

ifnotexist(argument_1, argument_2)

Arguments

The function accepts two mandatory arguments.

  1. The first argument is the argument whose existence must be checked.

  2. The second argument is the value to return if the argument_1 is present in the document.

  3. If argument_1 is not present in the document, the function returns its value.

Returned value

Documents matching the query.

Examples

ifnotexist(price, market) returns "market" in the document "Try to unfold the hidden job market" or "price" in the document "Food prices have almost tripled in Lebanon since October 2019".