marklogic-8

Query generate 'XDMP-CHILDNODEKIND: $final — element nodes cannot have binary node children' error

Deadly 提交于 2021-02-10 13:55:15
问题 Below is my simple query, that reads all files from a directory and holds all files in $final Variable save in one single file. But when run this query, after taking some time, it prompt [1.0-ml] XDMP-CHILDNODEKIND: $final -- element nodes cannot have binary node children error. let $input-dir :=xdmp:filesystem-directory("d:\work\may\06-05-2019\all- feeds-input-output\clc\log\clc-true-ouput\")/dir:entry let $final := for $each at $i in $input-dir return xdmp:document-get($each/dir:pathname

ml-gradle xsd for metadata for services

南楼画角 提交于 2021-01-27 20:23:28
问题 I am deploying my resource extensions using ML-Gradle. I want to specify the parameter types and cardinality. What is the format of the metadata.xml for a given marklogic resource service extension ? Is there a documentation or an xsd that I can use ? I did the following but it did not work <?xml version="1.0" encoding="UTF-8"?> <rapi:resource-metadata xmlns:rapi="http://marklogic.com/rest-api"> <rapi:name>crSearch</rapi:name> <rapi:source-format>xquery</rapi:source-format> <rapi:title

Why are there 2 documents on the same URI?

帅比萌擦擦* 提交于 2020-01-24 23:06:10
问题 I'm wondering why this has happened. May I know what all scenario's might have lead to this situation? 回答1: It is not usual for this to happen. It usually involves document insertions into explicit forests, or by re-attaching forests with documents at uris that are already in use. Fast-loading options of MLCP and the MapReduce connector can have that effect too. MLCP prints a warning for that reason. Avoid insertion into explicit forests, and use fast-loading options with care. For more

MARKLOGIC: Is it possible to use more than 1 columns from a CSV file when generating URI ID during data ingestion in MarkLogic?

独自空忆成欢 提交于 2020-01-21 19:16:22
问题 I am quite new to MarkLogic and I am not sure how to best deal with the challenge I have right now. I have a CSV file exported from a table that will be ingested to MarkLogic database. Now the source table uses 4 columns as its unique primary key combination. In MarkLogic, by default, only one column from CSV file can be used as the URI ID. My question is, is it possible to use more than 1 columns from a CSV file as the URI ID during data ingestion in MarkLogic? If yes, is this feature or

MARKLOGIC: Is it possible to use more than 1 columns from a CSV file when generating URI ID during data ingestion in MarkLogic?

江枫思渺然 提交于 2020-01-21 19:13:02
问题 I am quite new to MarkLogic and I am not sure how to best deal with the challenge I have right now. I have a CSV file exported from a table that will be ingested to MarkLogic database. Now the source table uses 4 columns as its unique primary key combination. In MarkLogic, by default, only one column from CSV file can be used as the URI ID. My question is, is it possible to use more than 1 columns from a CSV file as the URI ID during data ingestion in MarkLogic? If yes, is this feature or

Is there any frame work for Marklogic to write javascript code?

十年热恋 提交于 2020-01-04 05:28:21
问题 For Marklogic, it's a NoSQL db and powerful server engine. I use *.xqy file to write code before,but marklogic 8 has an advanced function is that it can write javascript code directly.For more speed to search at database, I want to transplant the xquery project to javascript project.But there is no existing frame to build my project. Actually, I was use the Roxy frame for my xquery project. And I need the same MVC framework for javascript. 回答1: There’s a lot to untangle here. First, the

How to return all the results in search:search API?

我们两清 提交于 2019-12-25 16:54:58
问题 I am using search:search API and came across a scenario in which I want all the docs returned. I know it will impact the performance but I can bear this as I know there won't be more than 30-50 docs. I can set the max threshold value which is 50 , but just want to know is there way to return all the results. If in future the count increases I don't need to change the threshold value. 回答1: You can specify a large pageLength, something like 999 or even bigger. I'd go for something smaller

Sort documents on the basis of document property using cts:search

眉间皱痕 提交于 2019-12-24 05:56:16
问题 I have document properties for each document - <prop:properties xmlns:prop="http://marklogic.com/xdmp/property"> <prop:last-modified>2017-04-12T04:55:57Z</prop:last-modified> </prop:properties> Now I want to sort my search results using prop:last-modified . One way which I got to know is to use a loop. But this loop will have an impact on the performance of the query. Is there any other way to get the search results with-in MarkLogic only? 回答1: cts:search() allows an order-specification as

Dynamic options via client-java-api

烈酒焚心 提交于 2019-12-24 01:06:07
问题 I am creating REST webservice that take parameters via url and search in marklogic based on these dynamic parameters. q=search&offset=0&limit=10& sort=documentId|asc&termAggregations=group:10 I am creating using StructuredQueryDefinition & RawCombinedQueryDefinition : StructuredQueryDefinition queryCriteria = sqb.or(query, sqb.properties(sqb.term(parameters.getQuery)))); String combinedQuery = "<search xmlns=\"http://marklogic.com/appservices/search\">" + queryCriteria.serialize() + options +

How to grant http://marklogic.com/xdmp/privileges/get-role privilege?

为君一笑 提交于 2019-12-23 12:43:35
问题 I am making a call to sec:role-exists(). I am trying to figure out what permissions are needed to grant this ability to someone other than admin. The error I am getting back implies that I need the http://marklogic.com/xdmp/privileges/get-role privilege. SEC-PRIVDNE: xdmp:security-assert("http://marklogic.com/xdmp/privileges/get-role", "execute") -- Privilege does not exist: action(http://marklogic.com/xdmp/privileges/get-role), kind(execute) However, when I try to grant this role using the