Loading TOC...

ModifyPlan.prototype.joinDocUri

ModifyPlan.prototype.joinDocUri(
   $uriCol as String,
   $fragmentIdCol as String
) as ModifyPlan

Summary

This method adds a uri column to rows based on an existing fragment id column to identify the source document for each row. The fragmentIdCol must be an op.fragmentIdCol specifying a fragment id column. If the fragment id column is null in the row, the row is dropped from the rowset.

You should minimize the number of documents retrieved by filtering or limiting rows before joining documents.

Parameters
$uriCol The document uri. This is an op.col('uri') object specifying a document uri column.
$fragmentIdCol The document fragment id value. This is an op.fragmentIdCol object specifying a fragment id column.

Usage Notes

joinDocUri is a method of the following classes:

Example


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

const empldocid = op.fragmentIdCol('empldocid'); 
const employees = op.fromView('main', 'employees', null, empldocid);

employees.joinDocUri(op.col('uri'), empldocid)
         .result(); 
  

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