CQMatch (open)
Create a match query
Syntax
LOADLIB "mod::consilio/lib/api.whlib";
RECORD FUNCTION CQMatch(STRING field, STRING matchtype, VARIANT value, RECORD options)Parameters
STRING fieldThe field to search
STRING matchtypeHow to match (possible values: 'IN', 'CONTAINS', '<', '<=', '=', '>=', '>')
VARIANT valueThe value to match
RECORD optionsOptions
FLOAT boostFactor to increase or decrease the score for this query (defaults to 1f)
Return value
RECORDThe match query
Description
This query can be used to match a field with a given value. The matching behaviour depends on the matchtype and the type of the value. For INTEGER and STRING values, matchtype "=" means a literal match and matchtype "CONTAINS" means a value match. For INTEGER ARRAY and STRING ARRAY values, matchtype "IN" means that the fields must contain at least one of the values and matchtype "CONTAINS" means that the field must contain all of the values. For DATETIME values, the matchtype can be one of "<", "<=", "=", "=>" or ">" to search for date ranges.