[MarkLogic Dev General] Unable to connect to REST server using custom app

2015-04-14 Thread Mark Shanks
Hi, I want to use the Top-Songs example as a code base, but the tutorial does not detail how to include a data visualization widget in this application. Going through the Data Visualization Widgets guide in the Search Developer's Guide also hasn't helped. The problem is that adding the data visu

Re: [MarkLogic Dev General] Unable to connect to REST server using custom app

2015-04-14 Thread Mark Shanks
lding your own UI on top of this new REST-api instance. Does that help? Cheers, Geert From: Mark Shanks Reply-To: MarkLogic Developer Discussion Date: Tuesday, April 14, 2015 at 5:33 PM To: "general@developer.marklogic.com" Subject: [MarkLogic Dev General] Unable to

[MarkLogic Dev General] Returning of averages rather than counts

2015-04-15 Thread Mark Shanks
Hi, I've been going through the analytics tutorial at https://developer.marklogic.com/learn/rest/analytics. I have a custom search returning an average on a variable. However, what is frequently needed is to return the average of a variable across another variable/facet. The tutorial shows how

Re: [MarkLogic Dev General] Returning of averages rather than counts

2015-04-16 Thread Mark Shanks
those numbers? Depending on how you want to use them, there might be different ways of approaching this in a smart way.. Cheers, Geert From: Mark Shanks Reply-To: MarkLogic Developer Discussion Date: Thursday, April 16, 2015 at 1:33 AM To: "general@developer.marklogic.com"

Re: [MarkLogic Dev General] 401 Unauthorized

2015-04-16 Thread Mark Shanks
I struck the same authentication error on Windows when trying to upload a document to the rest-api. I never got it to work. I found that I had to use the query console to upload the documents instead. From: yinyan...@hotmail.com To: general@developer.marklogic.com Date: Thu, 16 Apr 2015 19:33:13

[MarkLogic Dev General] Converting date format using xquery?

2015-04-21 Thread Mark Shanks
Hi, I have some data ingested into Marklogic, but found that marklogic cannot interpret dates in the form sql typically outputs, e.g., 03/17/2014 09:55:22. Instead, it should be in the xml form 2014-04-30T05:30:41. I wrote the following xquery to convert all of the dates in the referenced column

Re: [MarkLogic Dev General] Converting date format using xquery?

2015-04-21 Thread Mark Shanks
, " ")let $datepart := fn:tokenize($parts[1], "/")let $timestamp := fn:concat($datepart[3],"-", $datepart[1],"-",$datepart[2],"T",$parts[2])return xdmp:node-replace($t/text(), text{$timestamp} ) Thank you!Indrajeet On Wed, Apr 22, 2015 at 2:07 AM, Ma

[MarkLogic Dev General] Xquery to delete all null elements?

2015-05-12 Thread Mark Shanks
Hi, I want to run an xquery that deletes elements that are empty, e.g., The following code works for a specific element: declare namespace xh="http://marklogic/";for $t in (/xh:BOOKS)/xh:TITLESreturn if ($t='')then xdmp:node-delete($t)else () However, how can I modify it to delete all elements

[MarkLogic Dev General] Corb transform query

2015-05-27 Thread Mark Shanks
Hi, I've worked out how to run Corb2. However, it's not clear to me how to access elements using a query that is equivalent to what you would run in the query console. For instance, I can run the following in the query console: declare namespace xh="http://library/";for $t in (/xh:books)/xh:title

[MarkLogic Dev General] How to insert into a document the number of a particular element

2015-06-20 Thread Mark Shanks
Hi, So I’m looking for a xquery function that I would have thought would be quite common, but searching has turned up a blank (partly because the search terms I can think of are too generic). Say if you have the following documents: Moby DickChapter 1 title Chapter 2 title War o

[MarkLogic Dev General] Using -generate_uri with mlcp and lots of documents

2015-09-28 Thread Mark Shanks
Hi, I'm using the -generate_uri switch with the marklogic content pump as the documents I have don't have any unique id's contained within them. However, I've found a big problem in that, if I use mlcp with more than a million documents, the uri's that are generated no longer become unique and t

Re: [MarkLogic Dev General] Using -generate_uri with mlcp and lots of documents

2015-09-29 Thread Mark Shanks
xtra overhead.. Kind regards, Geert From: on behalf of Mark Shanks Reply-To: MarkLogic Developer Discussion Date: Monday, September 28, 2015 at 8:58 PM To: "General@developer.marklogic.com" Subject: [MarkLogic Dev General] Using -generate_uri with mlcp and lots of documen

Re: [MarkLogic Dev General] Using -generate_uri with mlcp and lots of documents

2015-09-30 Thread Mark Shanks
sition of a generated URI in mlcp local mode: --.” Can you provide the command-line that you used? Kind regards, Geert From: on behalf of Mark Shanks Reply-To: MarkLogic Developer Discussion Date: Tuesday, September 29, 2015 at 7:20 PM To: MarkLogic Developer Discussion Su

[MarkLogic Dev General] REST interface (sharepoint 2013) into Marklogic

2015-10-29 Thread Mark Shanks
Hi, Marklogic has a sharepoint connector, but I believe it hasn't been updated to work with Sharepoint 2013. Sharepoint 2013 has a REST interface, so that would seem to be the best way to get documents out of sharepoint and into Marklogic. Is there a utility already available to do this, or at l

[MarkLogic Dev General] Speeding up xquery returning aggregates

2016-09-16 Thread Mark Shanks
Hi, I'm trying to find the best way to return the results of what would be the following equivalent sql statement: select count(*) from Data where Audit_Date > "2010-01-01" and Audit_Date < "2011-01-01" and (Classification = "Finding" or Classification = "Observation") group by Site, Depart

Re: [MarkLogic Dev General] Speeding up xquery returning aggregates

2016-09-20 Thread Mark Shanks
for $each in $tuples return fn:concat($each[1], |, $each[2], |, $each[3], cts:frequency($each)) Best, Rob Rob Szkutak Senior Consultant MarkLogic Corporation rob.szku...@marklogic.com www.marklogic.com<http://www.marklogic.com> From: general-boun...@developer.m

Re: [MarkLogic Dev General] Speeding up xquery returning aggregates

2016-09-22 Thread Mark Shanks
ds, and pulling 4 facets would take 350 seconds. Anyone have any idea of what is going on under the hood to lead to such a breaking point between 1-2 facets and more facets? Any better way to do the query in such circumstances to avoid the performance hit? Thanks. Fr

Re: [MarkLogic Dev General] Speeding up xquery returning aggregates

2016-09-22 Thread Mark Shanks
nd #1 to be the most navigable alternative. Best, Rob Rob Szkutak Senior Consultant MarkLogic Corporation rob.szku...@marklogic.com www.marklogic.com<http://www.marklogic.com> From: general-boun...@developer.marklogic.com [general-boun...@developer.mar

Re: [MarkLogic Dev General] Speeding up xquery returning aggregates

2016-09-23 Thread Mark Shanks
b.szku...@marklogic.com www.marklogic.com<http://www.marklogic.com> From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Mark Shanks [markshanks...@hotmail.com] Sent: Thursday, September 22, 2016 7:02 PM To: Mark

Re: [MarkLogic Dev General] Speeding up xquery returning aggregates

2016-09-23 Thread Mark Shanks
__ From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Mark Shanks [markshanks...@hotmail.com] Sent: Friday, September 23, 2016 11:36 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Speeding up xq

[MarkLogic Dev General] Pulling data out of Marklogic quickly

2016-09-23 Thread Mark Shanks
Hi, We are trying to find the best way of getting high volumes of data out of Marklogic quickly. We have a lot of data in Marklogic, but there are only a few fields that we would like to pull out like this. Since there are only a few fields, making indexes for them is no problem. We would then

[MarkLogic Dev General] How to pull data out of marklogic quickly?

2016-10-10 Thread Mark Shanks
Hi, We have a need to pull large amounts of data out of marklogic as quickly as possible. I found that doing xquery searches like query-by-example were very slow. Using the cts functions led to a big speed increase. However, it isn't clear whether my current approach is the optimum, or whether

Re: [MarkLogic Dev General] How to pull data out of marklogic quickly?

2016-10-10 Thread Mark Shanks
m You can reach the person managing the list at general-ow...@developer.marklogic.com When replying, please edit your Subject line so it is more specific than "Re: Contents of General digest..." Today's Topics: 1. How to pull data out

Re: [MarkLogic Dev General] How to pull data out of marklogic quickly?

2016-10-11 Thread Mark Shanks
ld be worth taking a look at cluster-based tools like Hadoop. Apache Camel might allow parallel processing too.. Cheers, Geert From: mailto:general-boun...@developer.marklogic.com>> on behalf of Mark Shanks mailto:markshanks...@hotmail.com>> Reply-To: MarkLogic Developer Discussion mailt

Re: [MarkLogic Dev General] How to pull data out of marklogic quickly?

2016-10-24 Thread Mark Shanks
qy in your modules database, you can make a call to the rest api with http://myserver:1234/export/export-csv.xqy… Cheers, Geert From: mailto:general-boun...@developer.marklogic.com>> on behalf of Mark Shanks mailto:markshanks...@hotmail.com>> Reply-To: MarkLogic Developer Discussio

[MarkLogic Dev General] Using extract-document-data with GET and a REST endpoint

2016-10-24 Thread Mark Shanks
Hi, I have a REST endpoint up and can query documents so that the elements returned are limited by the following Options.xml file: http://marklogic.com/appservices/search";> test http://marklogic.com/appservices/search";> /audit/auditor /audit/date false I call t

Re: [MarkLogic Dev General] Using extract-document-data with GET and a REST endpoint

2016-10-25 Thread Mark Shanks
that to be a big issue. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Mark Shanks [markshanks...@hotmail.com] Sent: Monday, October 24, 2016 5:56 PM To: General@developer.marklogic.com Subject: [

[MarkLogic Dev General] Logging for MLCP

2017-11-02 Thread Mark Shanks
Hi, We have a requirement where we are ingesting json documents using mlcp with the delimited_json input file type. We would like to be able to log the json documents that failed ingestion. At the moment, mlcp outputs error messages, but these only identify the line where the error occurred, an