[MarkLogic Dev General] JavaScript TypeError

2015-12-14 Thread Ed Outhwaite
Hi folks, I’m sure there’s a quick answer to this, but I don’t have time to keep trying different things. I have the results of a sparql query where ?town may or may not be populated (optional). If it is, I need to manipulate the results: var town = ""; if (! doc.town) {

Re: [MarkLogic Dev General] Marklogic 7.0-5

2015-12-14 Thread Geert Josten
Hi Durai, Make sure there is a mail daemon of some kind running at port 25 on localhost. For instance postfix. Check installed services, and check whether they are up, and are launched at server start. Chkconfig will probably be your friend here.. Cheers, Geert From:

Re: [MarkLogic Dev General] JavaScript TypeError

2015-12-14 Thread Florent Georges
Hi Ed, It looks like `doc.town` is an object (at least is not `null` not `undefined`) but that it does not have a `replace` property. You should look at what `doc.town` is in the first place, and how you "get" it. Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ On

[MarkLogic Dev General] register own inference rule - not found

2015-12-14 Thread Weissenberg, Norbert
Using ML 8.0-4 on Win7 I tried to register an own inference rule for a transitive property locatedIn, but the file was not found by MarkLogic during Console SPARQL queries: a) Firstly, I tried to store the rules file in MarkLogic's Config folder and attached it like a standard rule - not

Re: [MarkLogic Dev General] register own inference rule - not found

2015-12-14 Thread John Snelson
On 14/12/2015 15:05, Weissenberg, Norbert wrote: Using ML 8.0-4 on Win7 I tried to register an own inference rule for a transitive property locatedIn, but the file was not found by MarkLogic during Console SPARQL queries: a) Firstly, I tried to store the rules file in MarkLogic’s Config

Re: [MarkLogic Dev General] register own inference rule - not found

2015-12-14 Thread Geert Josten
Hi Norbert, If you use MLCP to upload the rules, just provide a path, no type. It will take `documents` as default input_file_type, and `mixed` as document_type. As long as the files have .rules as extension, MarkLogic will recognize them as MarkLogic rules files, and ingest them as Text

Re: [MarkLogic Dev General] register own inference rule - not found

2015-12-14 Thread Weissenberg, Norbert
Thanks John and Geert, 1) I used mlcp: Unknown input type: text. I skipped the -input_file_type option (i.e. type=document), and it worked, as Geert finally described. I still need to find a good -output_uri_replacement myself, since an output_uri for this 1 file cannot be set directly. 2)

Re: [MarkLogic Dev General] Marklogic 7.0-5

2015-12-14 Thread Pavadaidurai A
Hi Geert, Thanks! Chkconfig was indeed helpful. Thanks, Durai. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Monday, December 14, 2015 5:49 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev

[MarkLogic Dev General] XDMP-EXTVAR with xdmp:spawn-function and external variables

2015-12-14 Thread Andreas Hubmer
Hi, It seems that I've found a bug concerning spawned functions and external variables. In a module with an external variable I spawn a function. The spawned function calls another function which fails with XDMP-EXTVAR when accessing the external variable. Here is a small example (main.xqy):

Re: [MarkLogic Dev General] register own inference rule - not found

2015-12-14 Thread Pierpaolo Bettoni
unsubscribe. > On Dec 14, 2015, at 8:48 AM, Weissenberg, Norbert > wrote: > > Thanks John and Geert, > > 1) I used mlcp: Unknown input type: text. I skipped the -input_file_type > option (i.e. type=document), and it worked, as Geert finally

[MarkLogic Dev General] Custom JSON objects

2015-12-14 Thread Kari Cowan
I had a question from someone on my team if it's possible to return a more simplified version JSON without child and attributes. For example, compare Events JSON object: http://data.smartlitigator.com/EventTools/GetEventsTable?display=New+York+Law+Journal|returnType=JSON To this:

Re: [MarkLogic Dev General] Custom JSON objects

2015-12-14 Thread Joe Bryan
Hi Kari, You can use the "custom" strategy with json:config(): http://docs.marklogic.com/json:config. There are lots of options that can be specified to control the transformation(for instance, "ignore-attribute-names"). Alternately, you can manipulate the resulting JSON object, or even code

Re: [MarkLogic Dev General] Custom JSON objects

2015-12-14 Thread Kari Cowan
Great, thanks very much - I'll look into that. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Joe Bryan Sent: Monday, December 14, 2015 11:08 AM To: MarkLogic Developer Discussion Subject: Re:

[MarkLogic Dev General] Marklogic 7.0-5

2015-12-14 Thread Pavadaidurai A
Hi, We have recently launched Marklogic 7.0-5 AMI in our dev environment and the smtp relay is configured as "localhost". I am getting the below error while attempting the xdmp:email API from the application. Can you help me diagnose the problem? 2015-12-14 08:15:49.965 Error: TaskServer:

Re: [MarkLogic Dev General] XDMP-EXTVAR with xdmp:spawn-function and external variables

2015-12-14 Thread Danny Sokolsky
Yes, this is a bug. We are already tracking it internally, but it is not yet fixed. Thanks, -Danny From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Andreas Hubmer Sent: Monday, December 14, 2015 8:45 AM To: MarkLogic Developer