Loading TOC...


   $rightPlan as String,
   [$condition as xs.boolean]
) as ModifyPlan


This method yields one output row set that concatenates every left row with every right row. Matches other than equality matches (for instance, greater-than comparisons between keys) can be implemented with a condition on the cross product.

The join performs natural joins between columns with the same identifiers. To prevent inadvertent natural joins, specify a different qualifier for the left or right columns or use different column names for the left and right columns.

$rightPlan The row set from the right view.
$condition A boolean expression that filters the join output rows. See Boolean Expression Functions for the list of functions used to build boolean expressions.

Usage Notes

joinCrossProduct is a method of the following classes:


const op = require('/MarkLogic/optic');

const employees = op.fromView('main', 'employees');
const expenses = op.fromView('main', 'expenses');

const Plan =
             .where(op.eq(employees.col('EmployeeID'), expenses.col('EmployeeID')))

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.