CQNested (open)
Create a query to search through nested fields
Syntax
LOADLIB "mod::consilio/lib/api.whlib";
RECORD FUNCTION CQNested(STRING field, RECORD query, RECORD options)
Parameters
STRING field
The nested field to query
RECORD query
The query to run
RECORD options
Options
FLOAT boost
Factor to increase or decrease the score for this query (defaults to 1f)
INTEGER count
The number of results to return (-1 for all results, defaults to 10)
INTEGER first
The first result to return (0-based, defaults to 0)
STRING orderby
Field to order over (defaults to ""
, which orders descending by score, can be set to the
value of the scorefield
option, doesn't have to be a field in the mapping
option)
BOOLEAN orderdesc
Whether to reverse the ordering (defaults to TRUE
when ordering by score or FALSE
when ordering by another field)
BOOLEAN returnnonmatching
Set to TRUE to have all the nested subrecords returned (by default only the matching subrecords are returned)
STRING scorefield
The name of the field to return the nested result's score in
STRING summaryfield
The name of the field to return the summary for the nested result in
STRING totalcountfield
The name of the field to return the total number of nested results in
Return value
RECORD