Questions tagged [marklogic-10]

Indicates questions specific to MarkLogic 10; use with the [MarkLogic] tag but not in place of.

MarkLogic 10 is the latest release of MarkLogic's NoSQL document database.

198 questions
1
vote
1 answer

op.xpath works slowly for multiple paths

Is there any other option to extract columns from result than using the op.xpath? For my code: var data = op .fromSearchDocs(cts.collectionQuery('xxx')) .limit(100) .select(columns.map(x => op.as(x, op.xpath('doc', '/' + x)))) .result() …
1
vote
2 answers

I want to write the XQuery to print the specific keys in JSON and want to except if it has an array value

I want to write the XQuery to print the specific keys in JSON and want to except if it has an array value. Sample JSON: { "id":"743", "transation":{ "101":"success", "102":"rejected", "301":"processing" }, …
Jayabalan
  • 361
  • 1
  • 7
1
vote
1 answer

cts.jsonPropertyRangeQuery vs cts.jsonPropertyValueQuery performance

I have more than a billion records in collection, I would like to know the performance of the cts.jsonPropertyRangeQuery and cts.jsonPropertyValueQuery. I need to query this much data very frequently, so please suggest which type of query is good…
DevNinja
  • 1,459
  • 7
  • 10
1
vote
1 answer

How to do sorting for specific values in Xquery?

AAAAA BBBB CCCC EEEE DDDD I want to do sorting on element "a" but only where name=123,…
anuj_gupta
  • 131
  • 4
1
vote
1 answer

I want to write the XQuery to print/iterate the keys and values in JSON

This is my sample JSON { "id":"743", "groupName":"group1", "transation":{ "101":"success", "102":"rejected", "301":"processing" } } Expected Result: "101":"success", "102":"rejected", "301":"processing" Can anyone please help me…
Jayabalan
  • 361
  • 1
  • 7
1
vote
1 answer

Convert the JSON attribute from smallcase to uppercase in XQuery and Marklogic 10

I have loaded the below JSON in MarkLogic and I need to convert the Name property value to upper case: { "Name": "User", "Id": "1", "date": "2022-01-01" } Any way to convert the value to upper case in Marklogic and XQuery, looking like below…
Jayabalan
  • 361
  • 1
  • 7
1
vote
1 answer

cts:search pass the node dynamically

Is there a way to have the below code working? let $node := 'childnode' return cts:search(/root/$node, cts:and-query(( cts:collection-query('collection') )) )
anuj_gupta
  • 131
  • 4
1
vote
1 answer

How to sort by dynamically with ascending or descending in Marklogic?

let $sortelement := 'Salary' let $sortby := 'ascending' for $doc in collection('employee') order by $doc/*[local-name() eq $sortelement] $sortby return $doc This code throws and error, what is the correct way to do this?
anuj_gupta
  • 131
  • 4
1
vote
1 answer

Marklogic tde templates how to use string-join for numeric values

Is it possible to use string-join for numeric values in marklogic template? let json = xdmp.toJSON({ "instance": { "uri": "/A/Uri/of/some/type.json", "types": [ "1", "2", "3" ] } …
1
vote
1 answer

In cts:search using fn:doc() vs specific node in query

In below 2 queries how big the difference will be in performance. Option 1- cts:search(fn:doc(), cts:and-query(( cts:collection-query('xyz'), cts:element-value-query(xs:QName('test'),'12344') )) ) Option 2- specific…
anuj_gupta
  • 131
  • 4
1
vote
1 answer

Rest vs XCC in MarkLogic

In Marklogic, do we have any preference over service call among REST API and XCC? Which is better for performance and why? Or which one is suitable in what scenario ? Assumption - Java layer is always present in the system.
anuj_gupta
  • 131
  • 4
1
vote
1 answer

Returning Properties in Marklogic Search Results

I’m using the Java API (although I don't think it's relevant) to run searches against Marklogic and I’d like to pull back some information from the document and from the document’s properties in the results. I’m able to pull back data from the…
David Harris
  • 705
  • 1
  • 7
  • 16
1
vote
0 answers

Ignore sub sup elements in search

In continuation from the link- (Ignore elements in cts:search) I have for eg 3 scenarios for phrase search- 1. CO2 lasers 2. 2H- and 3H-induced few nucleon transfer reactions 3. Mixed state, Hc2, surface…
ajitvg
  • 39
  • 3
1
vote
1 answer

How to call collector customize module in MARKLOGIC-DHF 5.6.1

I need to call external collector customize module in DHF 5.6.1. How can I do that? When I passed module in source query, it works but in main.sjs, I can only see 'uri' is coming within 'content' object. I can't see 'value' and 'context' within…
Manish
  • 59
  • 3
1
vote
1 answer

All row data is not getting reflected in Power BI from Marklogic

I have a csv file with 3 rows of data which is stored in Marklogic and available in collections. I am trying to access the content of the csv file from Power BI. But from Power BI I can only access 1 row of data at one time whereas requirement is to…