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
| import | |
| -host | |
| localhost | |
| -port | |
| 9000 | |
| -username | |
| admin |
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
| [global] | |
| directory=${DIRNAME} | |
| thread | |
| fsync=16 | |
| [ML_merging] | |
| blocksize=512k | |
| readwrite=rw | |
| size=5g | |
| ioengine=sync |
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
| * Documents | |
| • App-Services | |
| • Modules | |
| • Schemas | |
| • Triggers | |
| • Security | |
| curl --anyauth --user admin:XXXX -H "Content-Type: application/json" -X POST -d '{"forest-name": "Documents-replica-01","host": "myserver-02"}' http://localhost:8002/manage/v2/forests |
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
| (function () { | |
| var i, elements = document.querySelectorAll('body *'); | |
| for (i = 0; i < elements.length; i++) { | |
| if (getComputedStyle(elements[i]).position === 'fixed') { | |
| elements[i].parentNode.removeChild(elements[i]); | |
| } | |
| } | |
| })(); |
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
| echo "Testing if already configured" | |
| ADMIN_STATUS_CODE=`curl -I http://localhost:8001/admin/v1/init 2>/dev/null | head -n 1 | cut -d$' ' -f2` | |
| if [ "$ADMIN_STATUS_CODE" == "401" ]; then | |
| echo "Server is already configured." | |
| exit 0 | |
| fi |
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
| task importSampleData(type: com.marklogic.gradle.task.MlcpTask) { | |
| def directory = "./sample-dir/" // can get this from gradle properties | |
| //parse csv files | |
| doFirst { | |
| println "\nSTART: Reading files" | |
| def totalLineCount = 0 | |
| fileTree(directory).each{ file -> | |
| def filename = file.getName() | |
| def lineCount = java.nio.file.Files.lines(file.toPath()).count() -1; |
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
| task mySetDigestTask() { | |
| doFirst { | |
| println "SET DIGEST" | |
| } | |
| } | |
| task myUnSetDigestTask() { | |
| doFirst { | |
| println "UNSET DIGEST" | |
| } |
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
| task initHosts(type: com.marklogic.gradle.task.MarkLogicTask) { | |
| doLast{ | |
| def hostManager = new com.marklogic.mgmt.resource.hosts.HostManager(manageClient) | |
| def key = findProperty("mlLicenseKey") | |
| def licensee = findProperty("mlLicensee") | |
| hostManager.hostNames.each{ hostname -> | |
| println "Init ${hostname} with licenseKey=${key} and licensee=${licensee}" | |
| def adminConfig = adminManager.adminConfig | |
| adminConfig.host = hostname | |
| adminManager.adminConfig = adminConfig |
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
| task setStagingDatabaseToDigest(type: com.marklogic.gradle.task.MarkLogicTask) { | |
| doFirst{ | |
| def mc = getManageClient() | |
| if(mc.getJson("/manage/v2/servers?view=status&group-id=Default").contains('"' + mlStagingAppserverName + '"')) { | |
| mc.putJson("/manage/v2/servers/" + mlStagingAppserverName + "/properties?group-id=Default", '{"authentication":"digest"}') | |
| } | |
| } | |
| } | |
| task setStagingDatabaseToBasic(type: com.marklogic.gradle.task.MarkLogicTask) { |
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
| const cache = require("/lib/mlRequireCache.sjs") | |
| /* | |
| * Create Content Plugin | |
| * | |
| * @param id - the identifier returned by the collector | |
| * @param options - an object containing options. Options are sent from Java | |
| * | |
| * @return - your content | |
| */ |