It goes wrong here:
https://github.com/marklogic/slush-marklogic-node/blob/master/app/templates/rest-api/ext/analyze-data.xqy#L516
Replace:
local-name($node)
With:
local-name-from-QName(node-name($node))
And you should have something that works again.
I also suggest to turn on $use-path-indexes here:
https://github.com/marklogic/slush-marklogic-node/blob/master/app/templates/rest-api/ext/analyze-data.xqy#L19
Cheers,
Geert
From: Geert Josten
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion
<[email protected]<mailto:[email protected]>>
Date: Monday, May 11, 2015 at 4:10 PM
To: MarkLogic Developer Discussion
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] Analyze-data.xqy with JSON data
Hi there,
Sounds like my work. I have a copy of it here: https://gist.github.com/grtjn,
and it is also included in the slush template. Not sure which is latest, maybe
neither.
I’m a bit surprised it doesn’t work as is, but will have a look. I can imagine
though, it will not provide a lot of suggestions for json data, I really
created it a year ago, when EA1 wasn’t even out yet.. :)
Stay tuned,
Geert
From: Yinyan guy <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion
<[email protected]<mailto:[email protected]>>
Date: Monday, May 4, 2015 at 3:17 AM
To: MarkLogic Developer Discussion
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] Analyze-data.xqy with JSON data
Got it! Thank You Eric.
I did deploy this as an extension using the ./local deploy modules with
definition in /rest-api/ext/analyze-data.xqy
Regards,
Puneet
________________________________
From: [email protected]<mailto:[email protected]>
To: [email protected]<mailto:[email protected]>
Date: Mon, 4 May 2015 00:47:55 +0000
Subject: Re: [MarkLogic Dev General] Analyze-data.xqy with JSON data
Hi, Puneet:
Services available under /v1/resources are extensions that were installed under
/v1/config/resources and not services implemented and delivered as part of the
REST API itself.
You should contact whoever wrote the analyze-data extension about modifying it
to support JSON.
Hoping that helps,
Erik Hennum
________________________________
From:[email protected]<mailto:[email protected]>
[[email protected]<mailto:[email protected]>]
on behalf of Yinyan guy [[email protected]<mailto:[email protected]>]
Sent: Sunday, May 03, 2015 4:21 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Analyze-data.xqy with JSON data
HI Eric,
Thank You for your response!.
I am using following call "http://localhost:8040/v1/resources/analyze-data"
This has worked for me in this past for XML documents and when I was using ML7.
Now I am using it on ML8 and with JSON documents.
regards,
Puneet
________________________________
From: [email protected]<mailto:[email protected]>
To: [email protected]<mailto:[email protected]>
Date: Sun, 3 May 2015 13:36:29 +0000
Subject: Re: [MarkLogic Dev General] Analyze-data.xqy with JSON data
Hi, Puneet:
Can you provide an example of the REST API call that you're making to analyze
data?
Erik Hennum
________________________________
From:[email protected]<mailto:[email protected]>
[[email protected]<mailto:[email protected]>]
on behalf of Yinyan guy [[email protected]<mailto:[email protected]>]
Sent: Saturday, May 02, 2015 6:35 AM
To: [email protected]<mailto:[email protected]>
Subject: [MarkLogic Dev General] Analyze-data.xqy with JSON data
Hi All,
I am exploring the use of the analyze-data for index suggestion on my data. I
am using ML8 and my data is JSON. On running analyze-data using the REST API, I
got 400: Bad Request with message "XDMP-UNEXPECTED: (err:XPST0003) Unexpected
token syntax error, unexpected Rpar_, expecting Function30_ or Percent_"
I guess it works only with xml data. is there a JSON version in works?
Looking forward to hear from you.
regards,
Puneet
_______________________________________________ General mailing list
[email protected]<mailto:[email protected]> Manage
your subscription at: http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list
[email protected]<mailto:[email protected]> Manage
your subscription at: http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general