Re: [MarkLogic Dev General] Nested cts:search() functions over JSON documents

2015-03-12 Thread Nick Ardlie
Thanks Geert, The cts:json-property-scope-query() function is exactly what I was looking for. Regards, Nick ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general

Re: [MarkLogic Dev General] General Digest, Vol 129, Issue 20

2015-03-12 Thread Himalaya Naidupyla
Please don't send presently mails to me I will contact to u later Thanks, Himalaya -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of general-requ...@developer.marklogic.com Sent: Friday, March 13, 2015 11

Re: [MarkLogic Dev General] Nested cts:search() functions over JSON documents

2015-03-12 Thread Geert Josten
Hi Nick, I think you are looking cts:json-property-scope-query: xquery version "1.0-ml"; let $json-doc := xdmp:unquote( '{ "foo": { "bar": "UP HERE" }, "baz": { "foo": { "bar": "DOWN HERE" } } }') return xdmp:document-insert("/doc.json", $json-doc) ; "element search", cts:search(doc(), cts:elem

[MarkLogic Dev General] Nested cts:search() functions over JSON documents

2015-03-12 Thread Nick Ardlie
Is it possible to define nested (i.e. path constrained) queries in cts:search() over JSON document types in MarkLogic 8? With XML document types I can nest cts:element-query() functions to achieve this. But I don't seem to be able to use the cts:element-query() function for JSON. Unless I'm missin

Re: [MarkLogic Dev General] Constructing JSON objects

2015-03-12 Thread David Lee
Making an XQuery function to call the explicit constructor with variable key names or number of keys is not possible directly There isn't the equivalent of map:entry , field names are constant expressions and the number of fields is constant, unlike element {}{} You would have to resort to str

Re: [MarkLogic Dev General] Constructing JSON objects

2015-03-12 Thread Michael Blakeley
I tend to avoid declaring functions or variables in any namespace that I know other code is using. But you're doing it with your eyes open, and that's probably ok. Someday a server update may conflict. But if that happens, I'm sure you'll catch it in testing, and fix it before it breaks producti

Re: [MarkLogic Dev General] Constructing JSON objects

2015-03-12 Thread Will Thompson
Thanks all. The ML8 constructors look very nice. Mike - That's what I was looking for, thanks. I ended up writing something similar using json:array before I saw the reply, but I like your implementation better. Also, I appropriated the json: prefix because it looked nicer...for example, is the

Re: [MarkLogic Dev General] Constructing JSON objects

2015-03-12 Thread Sudhakar Reddy
You can also build using JSON node constructors available in ML 8 let $json-node := object-node { "id": number-node {12345}, "a" : array-node {1,2,3} , "b" : fn:true(), "c" : number-node {1234},

Re: [MarkLogic Dev General] General question on bi-temporal data

2015-03-12 Thread Fei Xue
Hi Adrian, As Anthony mentioned, it is totally fine to insert historical entries. In fact, it is one of the ways how bitemporal is useful for this use case. In your case when you are doing so, because you are making an update to a historical range, then using validEnd of INF is not suitable. S

Re: [MarkLogic Dev General] Issue with Registering Resoruce extenion in cluster

2015-03-12 Thread Erik Hennum
Hi, Gnanaprakash: > I believe it's not correct as in cluster all nodes should pick them up > automatically. If the 3 nodes share the same modules database, you should only have to install the extension once. Can you provide Support with the extension and the installation command you're using

Re: [MarkLogic Dev General] Please out me on the list

2015-03-12 Thread John Snelson
There's an unsubscribe field on the page linked at the bottom of the list emails: http://developer.marklogic.com/mailman/listinfo/general On 12/03/2015 11:54, alex.kar...@karmancorp.com wrote: Me, too. Original Message Subject: [MarkLogic De

Re: [MarkLogic Dev General] Please out me on the list

2015-03-12 Thread alex.karman
Me, too. Original Message Subject: [MarkLogic Dev General] Please out me on the list From: sunil indurkar Date: Wed, March 11, 2015 11:53 pm To: Hi,Can you please make me out of this list.ThanksSUNIL INDURKAR8885741

Re: [MarkLogic Dev General] General question on bi-temporal data

2015-03-12 Thread Anthony Coates
Classification: Public Adrian, I couldn't quite follow your description, but I do think data arriving later is a problem. Let me try to state it differently. When I use 'Inf' here, I really mean MarkLogic's "infinity", which is the last day in . Day-0: EOD position calculated Day-1: Day-

Re: [MarkLogic Dev General] fn:replace Query

2015-03-12 Thread Anthony Coates
Classification: Public “+” is a special character for regular expressions. The 2nd parameter to fn:replace is treated as a pattern, not just a plain string. Try “\+” instead. Cheers, Tony. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf

Re: [MarkLogic Dev General] Issue with Registering Resoruce extenion in cluster

2015-03-12 Thread Gnanaprakash.Bodireddy
HI Josten/Erik Our cluster configuration is as below 3 Nodes Cluster with 1 D-Node and 2 e-Nodes All the content, modules, services are in D-Node. We are using D-Node also for now as e-Node. Using our build we are registering our Rest Resource Extensions on Node-1 where our services exists.

Re: [MarkLogic Dev General] REST API call results in XDMP-UPDATEFUNCTIONFROMQUERY

2015-03-12 Thread Geert Josten
Hi Danny, Make sure to rename the function to local:put or local:post. You might also need to add a request body. A POST without request body can end up in local:get.. Cheers, Geert From: Danny Sinang mailto:d.sin...@gmail.com>> Reply-To: MarkLogic Developer Discussion mailto:general@develope

Re: [MarkLogic Dev General] REST API call results in XDMP-UPDATEFUNCTIONFROMQUERY

2015-03-12 Thread Danny Sinang
Hi Geert, I did try calling the said URL via PUT and POST but got the same XDMP-UPDATEFUNCTIONFROMQUERY error. Was I supposed to configure something somewhere to tell ML this was supposed to be called via PUT or POST ? Regards, Danny Sent from my iPhone > On Mar 12, 2015, at 4:27 AM, Geert Jo

Re: [MarkLogic Dev General] Cobol Signed Format

2015-03-12 Thread Geert Josten
Hi Abhishek, Not familiar with that format, but a quick search gives me the impression it is a textual format. I’d say you will have to write a transform (xslt/xqy/sjs) to convert to that desired format. Bit difficult to say how much work it would be to write such a transform.. Cheers From:

Re: [MarkLogic Dev General] REST API call results in XDMP-UPDATEFUNCTIONFROMQUERY

2015-03-12 Thread Geert Josten
Hi Danny, Jumping in late on this thread, but wanted to remark that you might not need to go through al this if you switched from doing GET’s to this endpoint to using POST or PUT.. Cheers From: Danny Sinang mailto:d.sin...@gmail.com>> Reply-To: MarkLogic Developer Discussion mailto:general@d

Re: [MarkLogic Dev General] Constructing JSON objects

2015-03-12 Thread Geert Josten
Just as a heads-up, in MarkLogic 8 you will be able to use json constructors, and will have to use xdmp:to-json-string instead: xdmp:to-json-string( object-node { "x": 1, "y": 1 } ) Cheers On 3/12/15, 3:02 AM, "Michael Blakeley" wrote: >I think Will is looking for a JSON syntax si

Re: [MarkLogic Dev General] Issue with Registering Resoruce extenion in cluster

2015-03-12 Thread Geert Josten
Hi Gnanaprakash, Some details on the layout of the cluster, regarding group/host/forest arrangements, could be helpful as well.. Cheers From: Erik Hennum mailto:erik.hen...@marklogic.com>> Reply-To: MarkLogic Developer Discussion mailto:general@developer.marklogic.com>> Date: Thursday, March 1