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 fieldThe nested field to query
RECORD queryThe query to run
RECORD optionsOptions
FLOAT boostFactor to increase or decrease the score for this query (defaults to 1f)
INTEGER countThe number of results to return (-1 for all results, defaults to 10)
INTEGER firstThe first result to return (0-based, defaults to 0)
STRING orderbyField 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 orderdescWhether to reverse the ordering (defaults to TRUE when ordering by score or FALSE
when ordering by another field)
BOOLEAN returnnonmatchingSet to TRUE to have all the nested subrecords returned (by default only the matching subrecords are returned)
STRING scorefieldThe name of the field to return the nested result's score in
STRING summaryfieldThe name of the field to return the summary for the nested result in
STRING totalcountfieldThe name of the field to return the total number of nested results in
Return value
RECORD