This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let $q1 := cts:or-query(("0","5")) | |
let $q2 := cts:or-query(("1","6")) | |
let $q3 := cts:or-query(("2","7")) | |
let $q4 := cts:or-query(("3","8")) | |
let $q5 := cts:or-query(("4","9")) | |
let $q6 := cts:near-query(($q1,$q2),100) | |
let $q6 := cts:near-query(($q3,$q3),100) | |
let $q7 := cts:near-query(($q3,$q4),100) | |
let $q8 := cts:near-query(($q4,$q5),100) | |
let $q9 := cts:or-query(($q6,$q7)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdmp:document-insert("1.xml",<a>{for $x in 1 to 10000 return " 0 1 2 3 4 5 6 7 8 9"}</a>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; | |
declare variable $config := admin:get-configuration(); | |
let $config := admin:group-add-trace-event($config, admin:group-get-id($config, "Default"), | |
( | |
admin:group-trace-event("Posting Positions 2X") | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: 2016-03-21 19:36:59.684 Notice: Documents: XDMP-OLDSTAMP: Timestamp too old for forest Documents (14582829718819729 < 14584613478666680; 14585890140870470) :) | |
(14582829718819729, 14584613478666680, 14585890140870470) ! xdmp:timestamp-to-wallclock(.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace qry = "http://marklogic.com/cts/query"; cts:uris((),(),cts:and-query(xdmp:plan(/binary())//qry:term-query/qry:key ! cts:term-query(.))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sar -uqBrp -n ALL -f 04_sa20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
(: | |
1) setup a cluster with a couple of hosts (127.0.0.1, 127.0.0.2) | |
2) create forest (replicatest) on host 127.0.0.2 | |
3) create forest (test) on host 127.0.0.1 | |
:) | |
declare variable $payload-status := '{ | |
"forest-name":"test", | |
"host":"' || xdmp:hostname() || '", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jsearch = require('/MarkLogic/jsearch.sjs'); | |
jsearch.documents() | |
.where( jsearch.byExample({ orderDate: {$ge: "1960-01-01T00:00:00.000"} }) ) | |
.orderBy(cts.indexOrder(cts.jsonPropertyReference('orderDate'), 'ascending')) | |
.slice(0,10) | |
.map(function(doc) {return doc.document;}) | |
.withOptions({returnQueryPlay: true}) | |
.result(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare function local:create-bootstrap-page($title as xs:string, $content as element()){ | |
element html { attribute lang {"en"}, | |
element head { | |
element meta { attribute charset {"utf-8"}}, | |
element meta { attribute http-equiv {"X-UA-Compatible"}, attribute content {"IE=edge"} }, | |
element meta { attribute name {"viewport"}, attribute content {"width=device-width, initial-scale=1"} }, | |
element title {$title}, | |
element link { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare namespace obj="http://marklogic.com/solutions/obi/object"; | |
declare function local:header(){ | |
text {"One,Two"} | |
}; | |
declare function local:process($uri as xs:string) { | |
text {fn:string-join((cts:element-values(xs:QName("obj:id"), (), (), cts:document-query($uri)), cts:element-values(xs:QName("obj:type"), (), (), cts:document-query($uri))), ",")} |