MarkLogic 10 Product Documentation
AccessPlan.prototype.intersect

AccessPlan.prototype.intersect(
   rightPlan as String
) as Plan

Summary

This method restricts the left row set to rows where a row with the same columns and values exists in the right row set.

Parameters
rightPlan The row set from the right view.

Usage Notes

intersect is a method of the following classes:

Example

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

const tab1 = op.fromLiterals([
	              {id:1, val:'a'},
	              {id:2, val:'b'},
	              {id:3, val:'c'}
	              ]);
const tab2 = op.fromLiterals([
	              {id:1, val:'x'},
	              {id:2, val:'b'},
	              {id:3, val:'c'}
	              ]);

tab1.intersect(tab2)
       .orderBy('id')
       .result();
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy