This file contains 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
{ | |
"name": "Detect if an extension installed", | |
"description": "Detect if an extension installed", | |
"version": "0.1", | |
"manifest_version": 2, | |
"permissions": [ | |
"management" | |
], | |
"browser_action": { | |
"default_popup": "popup.html" |
This file contains 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
mlcp.sh import \ | |
-host localhost \ | |
-port 8006 \ | |
-username user \ | |
-password ******* \ | |
-input_file_path /data/latest |
This file contains 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
for $speech in (doc()//SPEECH)[1 to 100] | |
let $speaker := $speech/SPEAKER | |
let $lines := $speech/LINE | |
return ( | |
<h2>{$speaker/text()}</h2>, | |
<p>{for $line in $lines return $line/text()}</p> | |
) |
This file contains 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
{ | |
"options": { | |
"debug": false, | |
"transform-results": { | |
"apply": "raw" | |
}, | |
"constraint": [{ | |
"name": "stars", | |
"range": { | |
"type": "xs:int", |
This file contains 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 sample = "http://marklogic.com/sample"; | |
let $groupsize := 1000 | |
let $values := cts:element-values(xs:QName("sample:value")) | |
let $count := fn:count($values) | |
let $groups := | |
for $i in (0 to (xs:int($count div $groupsize) + 1)) | |
let $group := $values[(($i * $groupsize) + 1) to (($i + 1) * $groupsize)] | |
return fn:string-join($group, "|") |
This file contains 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
<options xmlns="http://marklogic.com/appservices/search"> | |
<search-option>unfiltered</search-option> | |
<quality-weight>0</quality-weight> | |
<return-plan>true</return-plan> | |
<debug>true</debug> | |
<constraint name="tweet"> | |
<word> | |
<field name="tweet"/> | |
</word> | |
</constraint> |
This file contains 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
<options xmlns="http://marklogic.com/appservices/search"> | |
<search-option>unfiltered</search-option> | |
<quality-weight>0</quality-weight> | |
<return-plan>true</return-plan> | |
<debug>true</debug> | |
<constraint name="tweet"> | |
<word> | |
<field name="tweet"/> | |
</word> | |
</constraint> |
This file contains 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
<options xmlns="http://marklogic.com/appservices/search"> | |
<search-option>unfiltered</search-option> | |
<quality-weight>0</quality-weight> | |
<return-plan>true</return-plan> | |
<debug>true</debug> | |
<constraint name="tweet"> | |
<word> | |
<field name="tweet"/> | |
</word> | |
</constraint> |
This file contains 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"; | |
(: Create the database and forest on current host :) | |
import module namespace admin="http://marklogic.com/xdmp/admin" | |
at "/MarkLogic/admin.xqy"; | |
let $config := admin:get-configuration() | |
let $config := | |
admin:database-create($config, "tweets", | |
xdmp:database("Security"), xdmp:database("Schemas")) | |
let $config := admin:forest-create($config, "tweetsF1", xdmp:host(), ()) |
This file contains 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
<search:plan> | |
<qry:query-plan xmlns:qry="http://marklogic.com/cts/query"> | |
<qry:info-trace>xdmp:value("xdmp:plan(cts:search(fn:collection(),cts:query($query),$options,...")</qry:info-trace> | |
<qry:info-trace>Analyzing path for search: fn:collection()</qry:info-trace> | |
<qry:info-trace>Step 1 is searchable: fn:collection()</qry:info-trace> | |
<qry:info-trace>Path is fully searchable.</qry:info-trace> | |
<qry:info-trace>Gathering constraints.</qry:info-trace> | |
<qry:field-word-trace text="@NASA" field-name="tweet"> | |
<qry:key>12422997346279939379</qry:key> | |
</qry:field-word-trace> |
NewerOlder