Tutorial by Examples

cts:search( fn:doc(), cts:word-query("marklogic"))
This can be done in the following two ways - cts:search( fn:collection("first-collection"), cts:word-query("marklogic")) In this, the scope is changed from all the documents to documents in collection "first-collection" only. In the second approach, use ...
This query returns all the documents with element "company" and its value as "marklogic" cts:element-value-query(xs:QName('company'), 'marklogic'))
The following query returns the documents which have an element named "company" - cts:element-value-query( xs:QName('company'), '*', ("wildcarded"))) The following query returns the documents which have an element named "company" with an attribute named "name&...

Page 1 of 1