irisDeveloper | 19 Aug 14:46 2014
Picon

[MarkLogic Dev General] Attribute indexing

Hi all,

I didn't find anything in database configuration , for attribute 
indexing. Does MarkLogic support xml attribute indexing?

Thanks
Samby
Will Thompson | 19 Aug 00:16 2014

[MarkLogic Dev General] Java webservice/XCC security

A Java application will somehow need to securely be allowed to insert documents into the dbs of its callers,
which are all other ML databases (several developers, QA, and production). ML executes http-get calls to
Java with parameters for the jobs, Java does a bunch of work (this takes a while), and then finally inserts
documents into the caller's db via XCC. 

I have used semi-secure but convenient solutions for purely internal applications; however, this one
will have to work over the Internet. My first thought was to have the caller generate a token, pass to Java
SSL endpoint along with other parameters, Java calls XCC with limited credentials and the token, token is
checked by caller and insertion is amped if it matches, then token is deleted. Will that suffice, or are
there better, smarter ways to accomplish this? 

Thanks,

Will
Picon

[MarkLogic Dev General] sql interface for java

Hi All,
  Could the sql interface of marklogic be used by java? The databases of marklogic support the existence of sql interface and rest interface at the same time. So I think can I use the sql interface by java directly in order to not use the seach querymanager.

Best regards
evil
qinggangwang7 <at> gmail.com
<div>
<div>
<span></span>Hi All,</div>
<div>&nbsp; Could the sql interface of marklogic be used by java? The databases of marklogic support the existence of sql interface and rest interface at the same time. So I think can I use the sql interface by java directly in order to not use the seach querymanager.</div>
<div><br></div>
<div>Best regards</div>
<div>evil</div>
<div><span><div><div>qinggangwang7 <at> gmail.com</div></div></span></div>
</div>
Harry Bakken | 15 Aug 19:24 2014
Picon

[MarkLogic Dev General] Spawning tasks in clusters

I am having a hard time finding information about spawning tasks in a clustered environment. I have a process for ingesting data from a web service that will queue up service calls in the task server using xdmp:spawn. It works fine and does what we need, but when we run it in a clustered environment, only one node ends up with all the work.

It seems that the node where the xdmp:spawn call was made is the node where the task server will handle the work. Is there a way to have the nodes in the cluster work off of one task server queue, or is it node-specific? Is it a matter of simply queuing up work on each node in order to leveral all nodes in the cluster?

Thanks,
Harry
<div><div dir="ltr">I am having a hard time finding information about spawning tasks in a clustered environment. I have a process for ingesting data from a web service that will queue up service calls in the task server using xdmp:spawn. It works fine and does what we need, but when we run it in a clustered environment, only one node ends up with all the work.<div>
<br>
</div>
<div>It seems that the node where the xdmp:spawn call was made is the node where the task server will handle the work. Is there a way to have the nodes in the cluster work off of one task server queue, or is it node-specific? Is it a matter of simply queuing up work on each node in order to leveral all nodes in the cluster?</div>
<div><br></div>
<div>Thanks,</div>
<div>Harry</div>
</div></div>
Melean, Calixto | 13 Aug 17:07 2014

[MarkLogic Dev General] Reading a JSON document from the DB using the JAVA API

What’s the best way to read a JSON document from the DB using the JAVA API? 

One of the examples in the API distribution uses JacksonHandle, which I tried and fails with the issue described in this bug that requires the document ID to end in “.json”, which I’d like to avoid.

The other example reads the doc directly, with:

JsonNode doc = docMgr.readAs(docId, JsonNode.class);

When I try that, I get the exception below.

java.lang.IllegalArgumentException: No factory for class com.fasterxml.jackson.databind.JsonNode
at com.marklogic.client.impl.HandleFactoryRegistryImpl.makeHandle(HandleFactoryRegistryImpl.java:94)
at com.marklogic.client.impl.DocumentManagerImpl.readAs(DocumentManagerImpl.java:139)
at com.marklogic.client.impl.JSONDocumentImpl.readAs(JSONDocumentImpl.java:25)
at com.marklogic.client.impl.DocumentManagerImpl.readAs(DocumentManagerImpl.java:124)
at com.marklogic.client.impl.JSONDocumentImpl.readAs(JSONDocumentImpl.java:25)



_________________________________________________

This message is for the designated recipient only and may contain privileged, proprietary
or otherwise private information. If you have received it in error, please notify the sender
immediately and delete the original. Any other use of the email by you is prohibited.

Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk - Portuguese - Chinese
Svenska: www.cardinalhealth.com/legal/email

<div>
<div>
<span>What&rsquo;s the best way to read a JSON document from the DB using the JAVA API?&nbsp;</span>
<div><br></div>
<div>One of the examples in the API distribution uses JacksonHandle, which I tried and fails with the issue described in&nbsp;<a href="https://github.com/marklogic/java-client-api/issues/26">this bug</a>&nbsp;that requires
 the document ID to end in &ldquo;.json&rdquo;, which I&rsquo;d like to avoid.
<div><br></div>
<div>The other example reads the doc directly, with:</div>
<div><br></div>
<div>
<div>JsonNode doc = docMgr.readAs(docId, JsonNode.class);</div>
<div><br></div>
<div>When I try that, I get the exception below.</div>
<div><br></div>
<div>
<div>java.lang.IllegalArgumentException: No factory for class com.fasterxml.jackson.databind.JsonNode</div>
<div>
<span class="Apple-tab-span"></span>at com.marklogic.client.impl.HandleFactoryRegistryImpl.makeHandle(HandleFactoryRegistryImpl.java:94)</div>
<div>
<span class="Apple-tab-span"></span>at com.marklogic.client.impl.DocumentManagerImpl.readAs(DocumentManagerImpl.java:139)</div>
<div>
<span class="Apple-tab-span"></span>at com.marklogic.client.impl.JSONDocumentImpl.readAs(JSONDocumentImpl.java:25)</div>
<div>
<span class="Apple-tab-span"></span>at com.marklogic.client.impl.DocumentManagerImpl.readAs(DocumentManagerImpl.java:124)</div>
<div>
<span class="Apple-tab-span"></span>at com.marklogic.client.impl.JSONDocumentImpl.readAs(JSONDocumentImpl.java:25)</div>
</div>
</div>
</div>
</div>
<br><br><p><br>
_________________________________________________</p>

<p>This message is for the designated recipient only and may contain privileged, proprietary<br>
or otherwise private information. If you have received it in error, please notify the sender<br>
immediately and delete the original. Any other use of the email by you is prohibited.</p>

<p>Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk - Portuguese - Chinese<br>
Svenska: www.cardinalhealth.com/legal/email</p>
</div>
Kunal Chauhan | 13 Aug 10:54 2014
Picon

[MarkLogic Dev General] Unable to upload large size (GBs) XML files.

Hello All,

I am evaluting MarkLogic for our application. Application needs to store Large xml files (in GBs).
I will be also executing XQuries on those files.

I am working on MarkLogic's Developer licence version, on Windows machine, with following configuration 8 GB RAM and quad core 64 bit processor.
I have also tested on Linux machine having 8 cores and 64 GB RAM.

I unsuccessfully tried to upload documents preciosly 1.1 GB and 4.5 GB through load content module. After configuring database and forest.

I am facing following errors. 
Windows machine - XDMP-MEMORY Memory Exhausted. (Document loaded through "Application Services/Flow Editor")
Linux machine - XDMP-TOOMUCHTEXT Document contains too much text. (Document loaded through "Database bulk file load")
pfa with error screen shots.

Also tried MarkLogic content pump (MLCP) to import document. this way process get completed but I am not able to find the forest containing the data.
I checked in database attached with XDBC Server. 

can anyone help me in storing large size xml files using Java API and execute XQueries over it.

Thanks in advance,

Regards,
-- 
Kunal Chauhan
[+918655517141]
<div><div dir="ltr">
<div class="gmail_default">
<div class="gmail_default">Hello All,</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">I am evaluting MarkLogic for our application. Application needs to store Large xml files (in GBs).</div>
<div class="gmail_default">
I will be also executing XQuries on those files.</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">
I am working on MarkLogic's Developer licence version, on Windows machine, with following configuration 8 GB RAM and quad core 64 bit processor.</div>
<div class="gmail_default">
I have also tested on Linux machine having 8 cores and 64 GB RAM.</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">I unsuccessfully tried to upload documents preciosly 1.1 GB and 4.5 GB through load content module. After configuring database and forest.</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">I am facing following errors.&nbsp;</div>
<div class="gmail_default">Windows machine - XDMP-MEMORY Memory Exhausted. (Document loaded through "Application Services/Flow Editor")</div>
<div class="gmail_default">
Linux machine - XDMP-TOOMUCHTEXT Document contains too much text. (Document loaded through "Database bulk file load")</div>
<div class="gmail_default">
pfa with error screen shots.</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">
Also tried MarkLogic content pump (MLCP) to import document. this way process get completed but I am not able to find the forest containing the data.</div>
<div class="gmail_default">
I checked in database attached with XDBC Server.&nbsp;</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">
can anyone help me in storing large size xml files using Java API and execute XQueries over it.</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">Thanks in advance,</div>
<div class="gmail_default"><br></div>
<div class="gmail_default">Regards,</div>
<div class="gmail_default">--&nbsp;<br>
</div>
</div>
<div dir="ltr">
<div><span><span>Kunal Chauhan</span></span></div>
<span><span>
</span></span><div><span><span><a href="mailto:mail4ck@..." target="_blank">mail4ck@...</a></span></span></div>
<span><span>
</span></span><div><span><span>[+918655517141]</span></span></div>
</div>
</div></div>
Picon

[MarkLogic Dev General] A mistake?

Hi All,
   There is a confusing place in the middle of the Document MarkLogic Connector for Hadoop Developer’s Guide page 20
      $ mlcp.sh import -username user -password password -host localhost \ 
     -port 8008 hdfs:/user/me/hello-hadoop \
    -output_uri_replace "/user/me/hello-hadoop/,''"
  But there is no mlcp.sh in the marklogic,  I do not whether there are problems when I install Marklogic or there is a mistake in the Document.

  Can anyone give me a hand?

 Regards,
 evil
qinggangwang7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<div>
<div>
<span></span>Hi All,</div>
<div>&nbsp; &nbsp;There is a confusing place in the middle of the Document&nbsp;<span>MarkLogic Connector for Hadoop D</span><span>eveloper&rsquo;s Guide page 20</span>
</div>
<div>
<span>&nbsp; &nbsp; &nbsp;&nbsp;</span><span>$ mlcp.sh import -username user -password password -host localhost \&nbsp;</span>
</div>&nbsp; &nbsp; &nbsp;-port 8008 hdfs:/user/me/hello-hadoop \ 
<br>&nbsp; &nbsp; -output_uri_replace "/user/me/hello-hadoop/,''"<div>&nbsp; But there is no mlcp.sh in the marklogic, &nbsp;I do not whether there are problems when I install Marklogic or there is a mistake in the Document.</div>
<div><br></div>
<div>&nbsp; Can anyone give me a hand?</div>
<div><br></div>
<div>&nbsp;Regards,</div>
<div>&nbsp;evil<br><div><span><div><div>qinggangwang7@...</div></div></span></div>
</div>
</div>
Johan Mörén | 12 Aug 14:00 2014
Picon

[MarkLogic Dev General] Roxy and rxq

Hi

I started out developing a REST-api with the help of the rxq-framework. It worked very well and i really like the control it gives you over the design of the api.

After having developed the prototype I started to look for good ways to deploy, configure and test applications and found Roxy. For a Java-developer, like me. It had all the good things that I and my Continuous Intergration server needed. 

By creating a rest-type roxy-project and pointing to the rxq-rewriters in build.properties i managed to get effective configuration and deployment. However it looks like the testing part is dependant on the roxy-rewriter.

I tried to migrate my rest-api using roxys support for  Marklogic REST-extensions. But i didn't like the way it forced me to change the design of my API from using parts of the url to using parameters.  

Is there anyone on this list that has managed to merge these two worlds, rxq and Roxy, effectively?

Regards,
Johan Mörén
<div><div dir="ltr">
<span>Hi</span><div><br></div>
<div>I started out developing a REST-api with the help of the rxq-framework. It worked very well and i really like the control it gives you over the design of the api.</div>
<div><br></div>
<div>After having developed the prototype I started to look for good ways to deploy, configure and test applications and found Roxy. For a Java-developer, like me. It had all the good things that I and my Continuous Intergration server needed.&nbsp;</div>
<div><br></div>
<div>By creating a rest-type roxy-project and pointing to the rxq-rewriters in build.properties i managed to get effective configuration and deployment. However it looks like the testing part is dependant on the roxy-rewriter.</div>
<div><br></div>
<div>I tried to migrate my rest-api using roxys support for &nbsp;Marklogic REST-extensions. But i didn't like the way it forced me to change the design of my API from using parts of the url to using parameters. &nbsp;</div>
<div><br></div>
<div>Is there anyone on this list that has managed to merge these two worlds, rxq and Roxy, effectively?</div>
<div><br></div>
<div>Regards,</div>
<div>Johan M&ouml;r&eacute;n</div>
</div></div>
Picon

[MarkLogic Dev General] two questions about using marklogic

Dear All,
  I am researching for a task that need a good performance with OLAP and OLTP under the framework of hadoop. I have installed marklogic and hadoop succefully. There are two places that I do not understand well. 
  Does marklogic support sql contains update? 
    An error occured [08000]ERROR: SQL-ERROR: SQL error: sqlite3-step() failed due to error 'attempt to write a readonly database' when I excute sql that contains update.  
   I have known that marklogic supported transactions,  but it seemed that transactions in marklogic can not be excute as a sql
   
  Another querstion is  that could marklogic replace HDFS completely in hadoop ? which means that can I use hive or shark to query data in marklogic, as the data in my project is very large about 60TB and do not differentiate realtime data and age data.

regards
evil

qinggangwang7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<div>
<div>
<span></span>Dear All,</div>
<div>&nbsp; I am researching for a task that need a good performance with OLAP and OLTP under the framework of hadoop. I have installed marklogic and hadoop succefully. There are two places that I do not understand well.&nbsp;</div>
<div>&nbsp; Does marklogic support sql contains update?&nbsp;</div>
<div>&nbsp; &nbsp; An error occured [08000]ERROR: SQL-ERROR: SQL error: sqlite3-step() failed due to error 'attempt to write a readonly database' when I excute sql that contains update. &nbsp;</div>
<div><span>&nbsp; &nbsp;I have known that marklogic supported transactions, &nbsp;but it seemed that transactions in marklogic can not be excute as a sql</span></div>
<div>&nbsp;&nbsp;&nbsp;</div>
<div>&nbsp; Another querstion is &nbsp;that could marklogic replace HDFS completely in hadoop ? which means that can I use hive or shark to query data in marklogic, as the data in my project is very large about 60TB and do not differentiate realtime data and age data.</div>
<div><br></div>
<div>regards</div>
<div>evil</div>
<div><br></div>
<div><span><div><div>qinggangwang7@...</div></div></span></div>
</div>
Dinesh | 9 Aug 18:18 2014
Picon

[MarkLogic Dev General] Search Snippet

Hi,

Does anyone have an example of using custom code to customize snippet to get surrounding words for search hits.

The requirement, users select the number of surrounding words, MarkLogic to return number of surrounding words for the snippet, the surrounding words from text of any child/parent/preceding/following elements.

Thanks.

Regards,
Dinesh

<div><div class="WordSection1">
<p class="MsoNormal"><span>Hi,<p></p></span></p>
<p class="MsoNormal"><span>Does anyone have an example of using custom code to customize snippet to get surrounding words for search hits. </span><p></p></p>
<p class="MsoNormal"><span>The requirement, users select the number of surrounding words, MarkLogic to return number of surrounding words for the snippet, the surrounding words from text of any child/parent/preceding/following elements.<p></p></span></p>
<p class="MsoNormal"><span>Thanks.<p></p></span></p>
<p class="MsoNormal"><span>Regards,<br>Dinesh<p></p></span></p>
</div></div>
Picon

[MarkLogic Dev General] marklogic integrating with hadoop CDH5

Hi All,
   Can marklogic integrate with hadoop CDH5? 

Regards
evil
qinggangwang7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<div>
<div>Hi All,</div>
<div>
<span></span>&nbsp; &nbsp;Can&nbsp;marklogic integrate with hadoop CDH5?&nbsp;</div>
<div><br></div>
<div><span>Regards</span></div>
<div><span>evil</span></div>
<div><span><div><div>qinggangwang7@...</div></div></span></div>
</div>

Gmane