marklogic

How can I optimize a SPARQL query that returns optional properties?

北城余情 提交于 2019-12-10 18:28:25
问题 How can I optimize a SPARQL query like the following? The intent of this query is: Specify a resource (country resource where countryCode = "US" ) Get back optional properties defined on the resource. Unfortunately, the OPTIONAL blocks are being evaluated before the parent block, which causes the query engine to load all data for all countries. What I want is something like a LEFT OUTER JOIN behavior, but the query engine is not handling it this way. What can I do to improve query performance

Access Logs across a cluster

时光毁灭记忆、已成空白 提交于 2019-12-10 17:03:27
问题 I have a cluster with 3 nodes. I have Database with App Server configured. I would like to know If the access logs generated are same across the hosts in a cluster Or each host has a separate "Access log" that logs request to their hosts. I know that Each host in a cluster maintains its own audit log files. Does it work the same way for Access logs. Thanks, Karthik 回答1: All MarkLogic Logs on a host only contain info about that host. HTH! 回答2: You can access files on all hosts in a cluster

Loading data with mlcp - namespace issue

时间秒杀一切 提交于 2019-12-10 16:54:57
问题 I'm trying to load rss data from Wordpress into MarkLogic database. The data is in the form of following: <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0" xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.2/"> <item> <wp:post_id>1</wp:post_id> <wp:post_title>title 1</wp:post_title> <dc

MarkLogic 8 - Stream large result set to a file - JavaScript - Node.js Client API

£可爱£侵袭症+ 提交于 2019-12-10 15:35:45
问题 Let's say I have a query that is going to return a very large response. Possibly thousands of records and possibly gigabytes of data. Normally in the UI, we just show a single page of this data. Now I need an option to take the entire result set and stream it out to a file. Then the user can go download this at their leisure. So how do I select all results from a query using query builder and then stream it out to a file in chunks without running out of memory? 回答1: If you want the document

MarkLogic HTTP Server: Set up CORS headers

泪湿孤枕 提交于 2019-12-10 13:46:10
问题 I am running MarkLogic 7 on a CentOS 6.5 box . I have my HTML/JS application hosted on a MarkLogic HTTP server on the same machine. The application runs on port 8003, and needs to access data through a REST API running on a different port 8007. When I use an AJAX request in my application, I get an error saying No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://172.16.100.104:8003' is therefore not allowed access. Has anyone set up MarkLogic for CORS

MarkLogic - CORS with REST API

a 夏天 提交于 2019-12-10 10:31:08
问题 I have a MarkLogic-based web application which pulls data from two sources, a document store and a triple store both hosted on my MarkLogic server. The app uses MarkLogic's built-in REST APIs to access these data stores. The document store's REST API is running on port 8003 and the triple store's REST API is on port 8007. The application is hosted on the modules database of the document store. Now, when I make a REST API call to pull triple data, I get an exception saying the 'access-control

element word positions - conceptual questions

随声附和 提交于 2019-12-10 10:26:27
问题 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

MarkLogic 8 and server-side JavaScript - Debugging support

情到浓时终转凉″ 提交于 2019-12-10 04:10:29
问题 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? 回答1: Debugging, along with profiling and better logging, are on our roadmap. We’re looking at leveraging the debugger

Checking presence of attribute with cts:query

▼魔方 西西 提交于 2019-12-08 19:34:02
问题 cts:element-query(xs:QName("elm"),cts:and-query(())) will give all the fragments where the element elm is present. Similarly if I want all documents where an attribute(say atr ) is present under elm what would I have to do? cts:element-attribute-value-query() requires that I pass a value to match against the attribute value. But I want to check only the existence of the attribute irrespective of what value it contains. 回答1: You can do it by a simple cts:element-attribute-value-query cts

Is it possible to import data from SQL to MarkLogic

筅森魡賤 提交于 2019-12-08 10:52:13
问题 I'm trying to pull data from an existing SQL database into MarkLogic. There are several functions for importing documents and several ways of doing so, but the goal is to pull each row of data from each table into a MarkLogic forest as it's own document. (https://developer.marklogic.com/learn/sql-marklogic-mapping/) I have setup SQLdata and SQLschema as explained in the guide here: https://docs.marklogic.com/guide/sql/setup. I also setup an ODBC server on MarkLogic, but none of the