Loading TOC...


   $index as cts.reference
) as TuplesSearch


Creates a TuplesSearch object to define and execute a search for a list of rows where the values in each row co-occur in indexes for a document.

$index An array of cts.reference objects for range indexes or other value lexicons (such as those for uris or collections). As a shortcut, you can pass the name of a JSON property with a range index as a string.

Usage Notes

Use the methods of TuplesSearch to tailor your query. For example, scope your query to the values in documents matching a documents query, define a sort order, or compute an aggregate over the co-occurrences.

See Also


// Find co-occurrences of the "author" and "format" JSON properties
// in documents in "/books/" directory.
var jsearch = require('/MarkLogic/jsearch.sjs');

==> Co-occurence values similar to the following:

[["John Steinbeck", "audiobook"], ["John Steinbeck", "hardback"],
 ["John Steinbeck", "paperback"], ["Mark Twain", "hardback"], 
 ["Mark Twain", "paperback"], ["Robert Frost", "paperback"]]


    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy