MarkLogic 10 Product Documentation
op.fragmentIdCol

op.fragmentIdCol(
   name as String
) as fragmentIdColDef

Summary

Specifies a name for adding a fragment id column to the row set identifying the source documents for the rows from a view, lexicons or triples. The only use for the fragment id is joining other rows from the same document, the document uri, or the document content. The fragment id is only useful during execution of the query and not after.

Parameters
name The name of the fragment ID column.

Example

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

const Plan =
op.fromLexicons(
       {EmployeeID: cts.elementReference(xs.QName('EmployeeID'))},
       'myview',
       op.fragmentIdCol('Document Fragment'))
       .where(cts.jsonPropertyWordQuery('Position', 'Manager'));

Plan.result();
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy