Florent Georges | 26 Jan 16:31 2015

[MarkLogic Dev General] Bug in QConsole Explore feature

  Hi,

  The "Explore" feature un QConsole is making the expectation that a
document node has exactly one child node.  If there is a document with
several children, the following error is displayed and it is not
possible to explore the content of the database:

XDMP-ARGTYPE: (err:XPTY0004) xdmp:node-kind((fn:doc("/tmp/bug-explore.xml")/comment(), fn:doc("/tmp/bug-explore.xml")/hello)) -- arg1 is not of type node()

  The following reproduces the problem (execute it to insert an XML
document with a comment before the root element, a common practice,
then explore the same database you inserted it in):

    xdmp:document-insert(
      '/tmp/bug-explore.xml',
      document {
        comment { 'This is a comment' },
        <hello>World!</hello>
      })

  Regards,

-- 
Florent Georges



--
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

<div>
<div>&nbsp; Hi,</div>
<div><br></div>
<div>&nbsp; The "Explore" feature un QConsole is making the expectation that a</div>
<div>document node has exactly one child node.&nbsp; If there is a document with</div>
<div>several children, the following error is displayed and it is not</div>
<div>possible to explore the content of the database:</div>
<div><br></div>
<div>XDMP-ARGTYPE: (err:XPTY0004) xdmp:node-kind((fn:doc("/tmp/bug-explore.xml")/comment(), fn:doc("/tmp/bug-explore.xml")/hello)) -- arg1 is not of type node()</div>
<div><br></div>
<div>&nbsp; The following reproduces the problem (execute it to insert an XML</div>
<div>document with a comment before the root element, a common practice,</div>
<div>then explore the same database you inserted it in):</div>
<div><br></div>
<div>&nbsp; &nbsp; xdmp:document-insert(</div>
<div>&nbsp; &nbsp; &nbsp; '/tmp/bug-explore.xml',</div>
<div>&nbsp; &nbsp; &nbsp; document {</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; comment { 'This is a comment' },</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;hello&gt;World!&lt;/hello&gt;</div>
<div>&nbsp; &nbsp; &nbsp; })</div>
<div><br></div>
<div>&nbsp; Regards,</div>
<div><br></div>
<div>--&nbsp;</div>
<div>Florent Georges</div>
<div><a href="http://fgeorges.org/">http://fgeorges.org/</a></div>
<div><a href="http://h2oconsulting.be/">http://h2oconsulting.be/</a></div>
<div><br></div>
<br><br>-- <br>Florent Georges<br><a href="http://fgeorges.org/" target="_blank">http://fgeorges.org/</a><br><a href="http://h2oconsulting.be/" target="_blank">http://h2oconsulting.be/</a><br><br>
</div>
Ardal Powell | 26 Jan 02:01 2015

[MarkLogic Dev General] ERR_EMPTY_RESPONSE from security-install.xqy

Hi all,

I have installed MLS 7.0 on a Digitalocean droplet running Ubuntu 14.04.1. Having some security problems I hope you can help with.

The Admin Interface responded on port 8001 and installed the database but I'm unable to proceed to user setup because security-install-go.xqy returned an ERR_EMPTY_RESPONSE on posting the form data.

Now, attempting to use Admin returns a 500 Error with the following details:

500: Internal Server Error
SEC-NOADMIN: (err:FOER0000) User does not have admin role.
In /MarkLogic/security.xqy on line 5340
In sec:check-admin()
In /lib/status-check.xqy on line 16
In status-check()
In / on line 6

The install directory is /opt/MarkLogic. 

I haven't found any hints about this on MarkMail or Google. TIA for your advice.

Ardal
______________________

<div>
<div>Hi all,</div>
<div><br></div>
<div>I have installed MLS 7.0 on a Digitalocean droplet running Ubuntu 14.04.1. Having some security problems I hope you can help with.</div>
<div><br></div>
<div>The Admin Interface responded on port 8001 and installed the database but I'm unable to proceed to user setup because&nbsp;security-install-go.xqy returned an ERR_EMPTY_RESPONSE on posting the form data.</div>
<div><br></div>
<div>Now, attempting to use Admin returns a 500 Error with the following details:</div>
<div><br></div>
<div>
<span class="error">500: Internal Server Error</span><br><span>SEC-NOADMIN: (err:FOER0000) User does not have admin role.<br>In /MarkLogic/security.xqy on line 5340<br>In sec:check-admin()<br>In /lib/status-check.xqy on line 16<br>In status-check()<br>In / on line 6</span>
</div>
<div><br></div>
<div>The install directory is /opt/MarkLogic.&nbsp;</div>
<div><br></div>
<div>I haven't found any hints about this on MarkMail or Google. TIA for your advice.</div>
<div><br></div>
<div>Ardal</div>
<div><span class="Apple-style-span">______________________</span></div>
<div>
<span class="Apple-style-span"><span class="Apple-style-span"><div>
<span class="Apple-style-span"><div>
<span class="Apple-style-span"><div>
<span class="Apple-style-span"><div>
<span class="Apple-style-span"><div><span class="Apple-style-span"><div><span class="Apple-style-span"><span class="Apple-style-span"><span class="Apple-style-span"><span class="Apple-style-span"><div>Ardal Powell</div>
<div><a href="mailto:ardalp@...">ardalp@...</a></div>
<div><br></div>
<div><br class="khtml-block-placeholder"></div>
<div><br class="khtml-block-placeholder"></div>
<br class="Apple-interchange-newline"></span></span></span></span></div></span></div></span><br class="Apple-interchange-newline">
</div></span><br class="Apple-interchange-newline">
</div></span><br class="Apple-interchange-newline">
</div></span><br class="Apple-interchange-newline">
</div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br>
</div>
Shashidhar Rao | 25 Jan 10:53 2015
Picon

[MarkLogic Dev General] Defining Collections in Marklogic

Hi.

I have already loaded a bunch of xml files in marklogic database. I used Information studio to load these data.

Now I want these loaded data to belong to a certain collection.

Please help me in defining a collection for these data.

How to make these data belong to a particular collection. Is there a way I can set in the database localhost:8001 or using java api

Regards
Shashi
<div><div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hi.<br><br>
</div>I have already loaded a bunch of xml files in marklogic database. I used Information studio to load these data.<br>
</div>
<div><br></div>Now I want these loaded data to belong to a certain collection. <br><br>
</div>Please help me in defining a collection for these data.<br><br>
</div>
<div>How to make these data belong to a particular collection. Is there a way I can set in the database localhost:8001 or using java api<br><br>
</div>Regards<br>
</div>Shashi</div></div>
Himalaya Naidupyla | 22 Jan 12:11 2015

[MarkLogic Dev General] ML_REPORT PREPARATION

Shall we prepare report bby using Ml.Shall we develop Sentimentria tool results by using ml

 

Thanks,

Himalay

 

**************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS******** End of Disclaimer ********INFOSYS***
<div>
<div class="WordSection1">
<p class="MsoNormal">Shall we prepare report bby using Ml.Shall we develop Sentimentria tool results by using ml<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><span>Thanks,<p></p></span></p>
<p class="MsoNormal"><span>Himalay<p></p></span></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div>
<table><tr><td bgcolor="#ffffff">**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***</td></tr></table>
</div>
abhijeet | 21 Jan 17:56 2015

[MarkLogic Dev General] Data Rebalancing in Cluster Archtitecture: “Statistical” Assignment Policy

Hello Haito/All,

 

Quite interested in Statistical Assignment Policy (Data Rebalancing) especially in a Cluster Architecture i.e many D node servers but with different Memories & no. of CPU.

 

Does Server Memory or No. Of CPU play any role in Statistical policy? Or this type of data-rebalancing completely based on Document count even in the cluster architecture.

 

Quick update will be of great help.

 

Thanks & regards,

Abhijeet

 

Visit our website at http://www.ubs.com 

This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system. 

E-mails are not encrypted and cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message which arise as a result of e-mail transmission. 
If verification is required please request a hard-copy version. This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities 
or related financial instruments. 

UBS Limited is a company limited by shares incorporated in the United 
Kingdom registered in England and Wales with number 2035362.  
Registered Office: 1 Finsbury Avenue, London EC2M 2PP
UBS Limited is authorised by the Prudential Regulation Authority 
and regulated by the Financial Conduct Authority and the Prudential 
Regulation Authority.

UBS AG is a public company incorporated with limited liability in
Switzerland domiciled in the Canton of Basel-City and the Canton of
Zurich respectively registered at the Commercial Registry offices in
those Cantons with new Identification No: CHE-101.329.561 as from 18
December 2013 (and prior to 18 December 2013 with Identification
No: CH-270.3.004.646-4) and having respective head offices at
Aeschenvorstadt 1, 4051 Basel and Bahnhofstrasse 45, 8001 Zurich,
Switzerland and is authorised and regulated by the Financial Market
Supervisory Authority in Switzerland.  Registered in the United
Kingdom as a foreign company with No: FC021146 and having a UK
Establishment registered at Companies House, Cardiff, with
No: BR 004507.  The principal office of UK Establishment: 1 Finsbury
Avenue, London EC2M 2PP.  In the United Kingdom, UBS AG is authorised
by the Prudential Regulation Authority and subject to regulation
by the Financial Conduct Authority and limited regulation by the
Prudential Regulation Authority.  Details about the extent of our
regulation by the Prudential Regulation Authority are available
from us on request.

UBS reserves the right to retain all messages. Messages are protected 
and accessed only in legally justified cases. 
Visit our website at http://www.ubs.com 

This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system. 

E-mails are not encrypted and cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message which arise as a result of e-mail transmission. 
If verification is required please request a hard-copy version. This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities 
or related financial instruments. 

UBS Limited is a company limited by shares incorporated in the United 
Kingdom registered in England and Wales with number 2035362.  
Registered Office: 1 Finsbury Avenue, London EC2M 2PP
UBS Limited is authorised by the Prudential Regulation Authority 
and regulated by the Financial Conduct Authority and the Prudential 
Regulation Authority.

UBS AG is a public company incorporated with limited liability in
Switzerland domiciled in the Canton of Basel-City and the Canton of
Zurich respectively registered at the Commercial Registry offices in
those Cantons with new Identification No: CHE-101.329.561 as from 18
December 2013 (and prior to 18 December 2013 with Identification
No: CH-270.3.004.646-4) and having respective head offices at
Aeschenvorstadt 1, 4051 Basel and Bahnhofstrasse 45, 8001 Zurich,
Switzerland and is authorised and regulated by the Financial Market
Supervisory Authority in Switzerland.  Registered in the United
Kingdom as a foreign company with No: FC021146 and having a UK
Establishment registered at Companies House, Cardiff, with
No: BR 004507.  The principal office of UK Establishment: 1 Finsbury
Avenue, London EC2M 2PP.  In the United Kingdom, UBS AG is authorised
by the Prudential Regulation Authority and subject to regulation
by the Financial Conduct Authority and limited regulation by the
Prudential Regulation Authority.  Details about the extent of our
regulation by the Prudential Regulation Authority are available
from us on request.

UBS reserves the right to retain all messages. Messages are protected 
and accessed only in legally justified cases. 
Preethi Padmati | 21 Jan 07:20 2015

[MarkLogic Dev General] Reading Documents

Hi All,

 

 

                                Can you please let me know if I can read a complex text  from a document and segregate it based on key words using the Marklogic.

 

 

Thanks & Regards,

Preethi.Padmati

**************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS******** End of Disclaimer ********INFOSYS***
<div>
<div class="WordSection1">
<p class="MsoNormal">Hi All,<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can you please let me know if I can read a complex text &nbsp;from a document and segregate it based on key words using the Marklogic.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Thanks &amp; Regards,<p></p></p>
<p class="MsoNormal">Preethi.Padmati<p></p></p>
</div>
<table><tr><td bgcolor="#ffffff">**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***</td></tr></table>
</div>
"neil bradley" | 19 Jan 18:28 2015
Picon

[MarkLogic Dev General] Searching Standalone Properties Documents

Hi, I am having a problem working out how (if it is possible) to use
cts:search to find specific STANDALONE properties documents
(properties that are not associated with an actual document).

Every formulation of an XPath that I try either fails to find anything
that I know it should find, or says its "UNREACHABLE".

It does not surprise me that doc() does not work, because there IS no
document, and that collection() also does not work for a similar
reason.

I had hoped I could do something like:

  /property::*

But that is not working.

So, anyone know if its possible, and if so what kind of XPath I need?

Regards,

Neil.
Craig A. Berry | 19 Jan 03:38 2015
Picon

[MarkLogic Dev General] can a milestone tag be a fragment root?

I have about 500 XML documents averaging about 3MB or 4MB in size, though some are as small as 100K and one is as
large as 14MB.[1]  I can't really do anything at all with them in MarkLogic without specifying fragments,
so the question is what to use as fragment root or fragment parent.  I have multiple div elements in every
document and can at least successfully load the documents and do some simple queries when I specify div as
fragment root, but the div elements vary widely in size and are probably not the best choice for consistent
fragment size.

There are page break tags at regular intervals, and a quick check shows that a page has about 40K of data on it,
so that sounds promising as a basis for fragments given the recommendation in the documentation that
fragments should be between 10K and 100K in size.[2]  However, the page break is a milestone tag with no
content (something like <pb facs="14"/>).  If I specify such an element as the fragment root, will it work
as the fragment delimiter?  In other words, does the fragmenter create a fragment for everything enclosed
by the fragment root, or does it simply start a new fragment whenever it encounters the element specified
as the fragment root?

[1] And this is a small pilot investigation for a much larger collection of similar documents.
[2] https://docs.marklogic.com/guide/admin/fragments#id_46736

________________________________________
Craig A. Berry
mailto:craigberry@...

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Gilles Lenfant | 16 Jan 19:17 2015
Picon

[MarkLogic Dev General] Stuck creating a new XQuery resource service extension (ML7)

Hi,

Following Erik Hennum's, I started to write a client side Python
software following the REST API developer guide

http://docs.marklogic.com/guide/rest-dev/extensions#id_14646
http://docs.marklogic.com/REST/PUT/v1/config/resources/%5Bname%5D

Unfortunately I cannot have what I expected.

https://gist.github.com/glenfant/e7e812c24e30447aaedc

The XQuery that's uploaded is correct an works just as expected in the
query console.

I checked the HTTP request details and the provided credentials and
can't understand why I got a 400 HTTP response status and what does
the error message mean (see the Gist at above URL)

To run the example, just have Python 2.7 and "pip install requests",
and change REST endpoint and credentials accordingly.

Many thanks by advance to unlock me :)

--
Gilles LENFANT
Martin Mueller | 15 Jan 17:01 2015

[MarkLogic Dev General] A very general queston


I have a very general question, and it comes from a position of almost
complete ignorance.

I understand that MarkLogic is (among other things) an XML database and
that xquery is its central programming language. I also understand that
MarkLogic has some vendor specific features. And finally I understand that
MarkLogic scales "horizontally" and that it can probably handle very large
data sets with greater ease than open source tools.

Now my question: can you use MarkLogic in such a way that you only
standards compliant xquery so that you could take all or part of a data
set with its accompanying code and move it to another database? And if you
stay away from vendor specific extension, do you give up the promise of
easy 'scaling'?

Here is another way of asking the same question.  If you have a database
project that was done in MySQL it is work, but not a tremendous amount of
work, to migrate the project to Postgresql or the other way. Is roughly
the same thing true of MarkLogic or will it be the case that an effective
and efficient implementation of a project in MarkLogic is likely to be
very closely tied yo MarkLogic specific features?

Martin Mueller
Professor emeritus of English and Classics
Northwestern University

Blessing N | 14 Jan 11:21 2015
Picon

[MarkLogic Dev General] Regex positive lookahead not working in Xquery

Hi,

The positive lookahead regular expression which I have constructed
below throws  the following error

[1.0-ml] XDMP-REGEX: (err:FORX0002)
fn:replace("(search:&quot;good&quot;) OR (search:&quot;this(world) is
good&q...", "\)(?=([^&quot;]*[&quot;][^&quot;]*[&quot;])*[^&quot;]*$)",
"") -- Invalid regular expression

The Regex is

let $str := '(search:"good") OR (search:"this(world) is good") OR
(search:"world")'
return fn:replace(fn:replace($str,'\)(?=([^"]*["][^"]*["])*[^"]*$)',
""),'\((?=([^"]*["][^"]*["])*[^"]*$)', "")

Expected result >> search:"good" OR search:"this(world) is good" OR
search:"world"

Basically I'm trying to remove the open and closed brackets withing
the string but wanted them to be excluded if enclosed within double
quotes.

How to achieve positive lookahead using regex in Xquery?

Thanks,
Blessing.

Gmane