marklogic

element word positions - conceptual questions

Deadly 提交于 2019-12-06 03:00:54
I'm trying to understand the impact of the element word positions index setting. See the following xquery which returns the plan of a simple element-word-query search: xdmp:plan(cts:search(doc(), cts:and-query( cts:element-word-query(xs:QName("name"), "element word position") ), ("unfiltered") )) And the final-plan if the index is not activated (reduced form to save space): <qry:and-query> <qry:term-query>element(name),pair(word("element"),word("word"))</qry:term-query> <qry:term-query>element(name),pair(word("word"),word("position"))</qry:term-query> <qry:term-query>word("element")</qry:term

Marklogic query optimization on profiler outcome

旧巷老猫 提交于 2019-12-05 21:39:06
Hi MarkLoggers out there, I have again a question for you! I have a collection of documents containing postalcode information. 400.000 docs. The docs are ordered one zip code per doc, each doc contains 400 features , ordered in categories and variabeles like so: <postcode id="9728" xmlns="http://www.nvsp.nl/p4"> <meta-data> <!-- Generated by DIKW for NetwerkVSP ST!P --> <version>0.3</version> <dateCreated>2014-06-28+02:00</dateCreated> </meta-data> <category name="Oplages"> <variable name="Oplage" updated="2014-08-12+02:00"> <segment name="Bruto">1234</segment> <segment name="Stickers">234<

How to add attribute to all particular children of a node

99封情书 提交于 2019-12-05 18:39:24
I have the following node in which I want to add attribute to all add nodes. <test> <add>x1</add> <c><add>x2</add></c> <b att1="x">x</b> </test> I tried functx:add-attributes($test, xs:QName('att1'), 1) It can add the attribute to the test node. But When I tried functx:add-attributes($test/add, xs:QName('att1'), 1) It added the attribute to the first add node but returns only add node with added attribute. Then when I tried with $test//add it throws error. When I tried for $add in $test//add return functx:add-attributes($add, xs:QName('att1'), 1) It returns two add nodes individually. Now, how

How to create element range index in Marklogic?

风流意气都作罢 提交于 2019-12-05 18:36:28
I have the following xml:- <?xml version="1.0" encoding="UTF-8"?> <patent-assignment> <assignment-record> <correspondent> <name>NORTH AMERICA INTERNATIONAL PATENT OFFIC</name> <address-1>P.O. BOX 506</address-1> <address-2>MERRIFIELD, VA 22116</address-2> </correspondent> </assignment-record> <patent-assignors> <patent-assignor> <name>TSAI, YU-WEN</name> <execution-date> <date>20050331</date> </execution-date> </patent-assignor> <patent-assignor> <name>HUANG, CHENG-I</name> <execution-date> <date>20050331</date> </execution-date> </patent-assignor> </patent-assignors> <patent-assignees>

MarkLogic 8 - sort-order by path-index

青春壹個敷衍的年華 提交于 2019-12-05 06:02:10
Is sort-order by path-index already supported in ML 8? I want to achieve similar to the below: <options xmlns="http://marklogic.com/appservices/search"> <sort-order collation="http://marklogic.com/collation/en/S1/EO/CU/MO" type="xs:string" direction="ascending"> <path-index>attritbutes//name</path-index> </sort-order> </options> If not, is there a way to achieve this? I have several elements with the same name from different parent nodes or from the root element so I can't use just <options xmlns="http://marklogic.com/appservices/search"> <sort-order collation="http://marklogic.com/collation

MarkLogic 8 and server-side JavaScript - Debugging support

谁都会走 提交于 2019-12-05 04:47:54
Is there any plan to provide runtime debugging support for server-side JavaScript ? Most of the XQuery API has been ported to JavaScript, but the "dbg" module, which gives you an entry point into query execution, has not. As MarkLogic 8 embeds the Google JavaScript engine , does this provide debugging hooks, which will allow third-party developers to write interactive debuggers? Justin Makeig Debugging, along with profiling and better logging, are on our roadmap. We’re looking at leveraging the debugger in the Chrome Developer Tools . Are there other IDEs or environments you’re using that we

How to get node without children in xQuery?

天涯浪子 提交于 2019-12-04 10:11:27
So I have two nodes of elements that I'm essentially trying to join. I want the top level node to stay the same but the child nodes to be replaced by those cross referenced. Given: <stuff> <item foo="foo" boo="1"/> <item foo="bar" boo="2" /> <item foo="baz" boo="3"/> <item foo="blah boo="4""/> </stuff> <list a="1" b="2"> <foo>bar</foo> <foo>baz</foo> </list> I want to loop through "list" and cross reference elements in "stuff" for this result: <list a="1" b="2"> <item foo="bar" boo="2" /> <item foo="baz" boo="3"/> </list> I want to do this without having to know about what attributes might be

search:search() vs cts:search() in MarkLogic

主宰稳场 提交于 2019-12-04 09:16:38
I have read about cts:search() and search:search() separately but could not figure out the exact difference between them. It says cts:search() ultimately uses search:search() . Can anyone illustrate in detail the scenario where one should go for cts:search() and for search:search() .This is not in relation to some particular project work where I need to implement this but in general. Thanks! Also worth mentioning are the: Client REST API , which basically exposes the Search API as an HTTP interface Java Client API , which exposes the Client REST API as a set of convenient Java objects, and

How Can I use Apache to load balance Marklogic Cluster

空扰寡人 提交于 2019-12-04 07:52:58
Hi I am new to Marklogic and Apache. I have been provided task to use apache as loadbalancer for our Marklogic cluster of 3 machines. Marklogic cluster is currently running on Linux servers. How can we achieve this? Any information regarding this would be helpful. You could use mod_proxy_balancer . How you configure it depends what MarkLogic client you would like to use. If you would like to use the Java Client API , please follow the second example here to allow apache to generate stickiness cookies. If you would like to use XCC, please configure it to use the ML-Server-generated or backend

With Logstash, how do you combine lines based on matching same timestamp on every line?

做~自己de王妃 提交于 2019-12-04 04:51:50
问题 MarkLogic log files denote mulitple lines by printing the lines with the same timestamp down to the millisecond. You can see that in this snippet: 2014-05-09 18:47:33.844 Info: Dev_Xdbc: [/file-store/get-file.xqy] url=/2.16.840.1.113883.3.21/d3c787ef-2244-48e4-a8a9-82ae5e7ad47a-296 tenant=perform001 2014-05-09 18:47:34.101 Notice: Dev_Xdbc: XDMP-MODNOTFOUND: (err:XQST0059) Module /2.6.0/utils/no-fn.xqy not found 2014-05-09 18:47:34.101 Notice: Dev_Xdbc: [1.0-ml] So here the two lines starting