- 
                Notifications
    You must be signed in to change notification settings 
- Fork 74
Closed
Description
The PlanBuilder needs to have support for xpath(). Looking at JavaScript API we can do :
const op = require('/MarkLogic/optic'); 
...
...
const output =
        plan1.joinInner(plan2, op.on(op.viewCol(null, 'city'), op.viewCol(null, 'cityName')))
        .orderBy(op.desc('uri2'))
        .joinInnerDoc('doc', 'uri1')
        .select(['uri1', 'city', 'popularity', 'date', 'distance', 'point', op.as('nodes', op.xpath('doc', '//city')), 'uri2', 'cityName', 'cityTeam'])
        .where(op.isDefined(op.col('nodes')))
        .result();
The same cannot be done in Java due to missing xpath() from PlanBuilder class.