[MarkLogic Dev General] XML to JSON using MLCP

2017-02-07 Thread Shiv Shankar
Hi, I am using nested xml and used* -input_file_type aggregates* since it is a nested XML. I see them inserting as XML documents. Is there way I can insert them as json documents using MLCP? Thanks Shan. ___ General mailing list

Re: [MarkLogic Dev General] General Digest, Vol 152, Issue 18

2017-02-08 Thread Shiv Shankar
individual to whom it is addressed. Any review, > disclosure, copying, > distribution, or use of this e-mail communication by others is strictly > prohibited. If you > are not the intended recipient, please notify us immediately by returning > this message to > the sender and delete

[MarkLogic Dev General] Finding target geocodes using REST API

2017-02-24 Thread Shiv Shankar
Hi, I could able to achieve finding the nearest addresses based on the starting geo codes in a circle with in the given distance using SJava Script API in the qconsole and I wanted to achive the same using REST. I see very less documentation and I found these part of Options in a QBE. Any help

[MarkLogic Dev General] Patch update PDF/binary data

2016-08-19 Thread Shiv Shankar
Hi, I am getting when I do patch update of binary data to an existing json object. url -v -X POST --basic --user user:pwd --data-binary '@mydoc.pdf' -i -H "Content-type: application/binary" -H "X-HTTP-Method-Override: PATCH" ' http://localhost:8004/LATEST/documents?uri=/test/899'

[MarkLogic Dev General] modules, conditions to validate JSON documents in CPF

2016-09-13 Thread Shiv Shankar
Hi, As part of Pipeline definition in Content Processing Framework, I need to handle JSON documents. I added below lines in the Pipeline file. But it is unable to call action module. Please advise.' Note: added add-something to module. and the given tutorial is working for XML content.

Re: [MarkLogic Dev General] General Digest, Vol 147, Issue 16

2016-09-14 Thread Shiv Shankar
Hi Indy, Thanks for your reply. I added same text to the mimetype-conditions.xqy, but saying condition failed. Can you share your working condition for mime-type as json to my personal email shiv.shivshan...@gmail.com? My condition is below and version is ML8.0-5.5

Re: [MarkLogic Dev General] General Digest, Vol 147, Issue 51

2016-09-29 Thread Shiv Shankar
lection('accounts')) { > var account = doc.toObject(); > account.balance = account.balance * 1.05; > xdmp.nodeReplace(doc, account); > } > > Note that you also need a declareUpdate(). The transaction is committed > (or rolledback) automatically, so you don't need the xdmp.commit(

[MarkLogic Dev General] Error XDMP-CONFLICTINGUPDATES: xdmp:document-insert("/test/test001.json"

2016-09-21 Thread Shiv Shankar
Hi, I'm keep getting this below error. Any thoughts. [1.0-ml] XDMP-CONFLICTINGUPDATES: xdmp:document-insert("/mmis/test001.json" my code is : return xdmp:invoke-function( function() {dls:document-insert-and-manage("/mmis/test001.json", fn:true(),$contents,(),(),"TEST-COLLECTION"),

[MarkLogic Dev General] Error :XDMP-CONFLICTINGUPDATES

2016-09-21 Thread Shiv Shankar
Hi Rob, I was just constructing the $contents . Any thoughts? let $contents :={'key':'value'} return xdmp:invoke-function( function() {dls:document-insert-and-manage("/test/test001.json", fn:true(),$contents,(),(),"TEST-COLLECTION"), xdmp:commit() }, update );

[MarkLogic Dev General] Getting multiple documents using REST

2016-08-18 Thread Shiv Shankar
Hi, I'm using QBE and have the parameters with 'Accept: multipart/mixed'. I'm getting the results as separate values. Is there a way I can get all results ( content) in one document ? Tried with Qbe params, but no success. Regards Shan ___ General

Re: [MarkLogic Dev General] General Digest, Vol 146, Issue 46

2016-08-23 Thread Shiv Shankar
16 bytes > Desc: not available > Url : http://developer.marklogic.com/pipermail/general/ > attachments/20160822/e09a157c/attachment-0002.gif > -- next part -- > A non-text attachment was scrubbed... > Name: image002.gif > Type: image/gif > Size: 1616 bytes

[MarkLogic Dev General] Adding PDF to an existing json document using Patch

2016-08-22 Thread Shiv Shankar
Hi Erik Hennum If I go with PUT, it is replacing the entire document,which is not acceptable. How to add json document+pdf in one document ? I used below approach 1. Added a PDF as a separate document and tried adding that uri as part of PATCH to referring document, but getting message 204

[MarkLogic Dev General] GET bulk data in array format

2016-08-24 Thread Shiv Shankar
Hi, I am using QBE as part of search operation using REST and I am getting the result in multipart/mixed format with --BOUNDARY text along with meta-data, I am wondering is there a way I get these many documents combined in to an array[]. Ex: [ {K,V}, {K,v}, {K,V} ] Thanks Shiva.

[MarkLogic Dev General] XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace

2016-09-28 Thread Shiv Shankar
Hi, I am getting XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace to update JSON attributes, instead of over-writing entire document. Any advice. BTW, I used xdmp.eval, but it is not identifying the java script variables. Thanks ShivShankar. ___

Re: [MarkLogic Dev General] XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace

2016-09-28 Thread Shiv Shankar
gt; Senior Consultant > MarkLogic Corporation > rob.szku...@marklogic.com > www.marklogic.com > > -- > *From:* Shiv Shankar [shiv.shivshan...@gmail.com] > *Sent:* Wednesday, September 28, 2016 3:35 PM > *To:* general@developer.marklogic.com; Rob Szkutak &g

Re: [MarkLogic Dev General] General Digest, Vol 147, Issue 53

2016-10-03 Thread Shiv Shankar
: > >1. Re: General Digest, Vol 147, Issue 51 (Justin Makeig) > > > -- > > Message: 1 > Date: Thu, 29 Sep 2016 16:32:44 + > From: Justin Makeig <justin.mak...@marklogic.com> > Subject: Re: [MarkLogic

Re: [MarkLogic Dev General] General Digest, Vol 147, Issue 53

2016-10-03 Thread Shiv Shankar
t;); } On Mon, Oct 3, 2016 at 3:28 PM, Justin Makeig <justin.mak...@marklogic.com> wrote: > I still don't understand what your code is trying to do. Can you please > describe in words what you're trying to accomplish? Where does `matViewUri` > come from? How does it rel

Re: [MarkLogic Dev General] General Digest, Vol 148, Issue 26

2016-10-17 Thread Shiv Shankar
ow transactions work on > MarkLogic. > > You can think of it as the following simplification: all changes to > documents (including inserting new ones) are accumulated whilst your code > is executing, then actually written to the database when the transaction > automatically commi

[MarkLogic Dev General] More insights on MarkLogic 9.0

2016-11-16 Thread Shiv Shankar
Hi, Any deeper-insight documents on MarkLogic 9.0 features? Regards Shan. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general

Re: [MarkLogic Dev General] General Digest, Vol 149, Issue 25

2016-11-17 Thread Shiv Shankar
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. More insights on MarkLogic 9.0 (Shiv Shankar) >2. Sharin

[MarkLogic Dev General] Update entire collection in one single request

2016-11-21 Thread Shiv Shankar
Hi, Is there a xquery/JavaScript command to update a field in entire collection/all documents based on criteria in MarkLogic 8.0.5? I can achieve this with Jsearch in loop, but wanted to check if there is any single command? Thanks Shan. ___ General

[MarkLogic Dev General] No option to pass query params in xdmp:http-get

2016-10-31 Thread Shiv Shankar
Hi, I tried calling an external ws with xdmp:http-get() which is deployed in local host http://localhost:8080/q1=1=2=3 , it is throwing as XDMP-ENTITYREF: (err:XPST0003) Invalid entity reference "q2=" I am trying to call external ws from console. Any advise? Regards Shan.

Re: [MarkLogic Dev General] No option to pass query params in xdmp:http-get

2016-10-31 Thread Shiv Shankar
Thanks Williams and Justin. I was pretty close to that. On Mon, Oct 31, 2016 at 12:01 PM, Shiv Shankar <shiv.shivshan...@gmail.com> wrote: > Hi, > I tried calling an external ws with xdmp:http-get() which is deployed in > local host http://localhost:8080/q1=1=2=3 , it is thr

[MarkLogic Dev General] search after xdmp.documentInsert() getting 0 results

2016-10-15 Thread Shiv Shankar
Hi, I tried all the possibilities in fetching the results using jsearch.search after using xdmp.documentInsert() ( I used declareUpdate() on top) in CPF process, but resulting no documents in the collection. After this process, when I do same search , I get the results. I used xdmp.commit()

Re: [MarkLogic Dev General] mlcp Transaction Errors - SVC-EXTIME and XDMP-NOTXN #CGO#

2016-12-06 Thread Shiv Shankar
Hi Abhishek, I had this thread configuration in my list, but did not try with that. Since it worked for you, let me try. Thanks for confirming. Shan. On Tue, Dec 6, 2016 at 11:00 AM, Jain, Abhishek < abhishek.b.j...@capgemini.com> wrote: > Hi shiv, > > I have answer a similar query earlier.

[MarkLogic Dev General] MarkLogic 9.0 release

2017-01-10 Thread Shiv Shankar
Hi, Any updates on MarkLogic 9.0 GA? Thanks Shan. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general

[MarkLogic Dev General] sort-order is not working as expected

2017-01-11 Thread Shiv Shankar
Hi, I am using sort-order option in "search" query, but the results are not in order as expected i.e it is same order for Ascending/descending. I created an range-index too. Any advise? Query: http://localhost:8080/LATEST/qbe?query={

[MarkLogic Dev General] MLCP is taking longer to upload 5GB

2016-12-05 Thread Shiv Shankar
Hi, It took me more that 5 hours for 5 GB of data when I loaded with below command. And I see ForestReserve is getting spiked up while loading the data. I am using default params ( disabled all Indexes , FYI). Any advice to optimise and reduce the usage of ForestReserve. ./bin/mlcp.sh import

Re: [MarkLogic Dev General] sort-order is not working with REST

2017-01-04 Thread Shiv Shankar
Shan. On Wed, Jan 4, 2017 at 12:05 PM, Shiv Shankar <shiv.shivshan...@gmail.com> wrote: > Hi, > I am trying to use sort-order in $query. It is returning 0 records. All > my documents are JSON. Any inputs? > > {"$query":{"options":{"sort-order":[{

[MarkLogic Dev General] sort-order is not working with REST

2017-01-04 Thread Shiv Shankar
Hi, I am trying to use sort-order in $query. It is returning 0 records. All my documents are JSON. Any inputs? {"$query":{"options":{"sort-order":[{"direction":"descending","element":{"name":"firstName","score": null}}]}}} Tried with

Re: [MarkLogic Dev General] sort-order is not working with REST

2017-01-04 Thread Shiv Shankar
Hi Eric, Yes, range index is there for that field. --Shan. On Wed, Jan 4, 2017 at 2:03 PM, Shiv Shankar <shiv.shivshan...@gmail.com> wrote: > Thanks Eric, > With this change, I could get the data, but no order change though the > sort-order specified ascending/descending. >

[MarkLogic Dev General] Search for empty falues

2016-12-20 Thread Shiv Shankar
Hi, I need to search for empty values for a given key, Tried below, but resulted nothing. I see values with empty in the collection. Any advice? jsearch.documents().where(jsearch.byExample({EMP_ID: ""})).result(); Thanks Shan. ___ General mailing list

Re: [MarkLogic Dev General] General Digest, Vol 150, Issue 24

2016-12-22 Thread Shiv Shankar
arch.documents().where(cts.notQuery(cts. > jsonPropertyScopeQuery('test4', cts.trueQuery(.result(); > > > Hoping that helpsl, > > > Erik Hennum > > > > From: general-boun...@developer.marklogic.com [general-bounces@developer. >

[MarkLogic Dev General] Element Range Index query not working

2017-03-16 Thread Shiv Shankar
Hi, My below query below is failing by fetching all data. sample data: { "pid": 1, "fname": "", "lname": "", "pinfo": [ { "screen": "1", "startDate": "2003-02-13T19:18:21.810Z", "endDate": "" }, { "screen": "2", "startDate":

Re: [MarkLogic Dev General] General Digest, Vol 153, Issue 19

2017-03-17 Thread Shiv Shankar
Subject: Re: [MarkLogic Dev General] Element Range Index query not working > > Hi Shan, > > You search on a date that is larger than the two dates in the data, and > also specify GT (Greater Than). That will not match either of the > startDates. Have you tried with LT or LE? >

Re: [MarkLogic Dev General] Scramble production data for testing in ML 8.x

2017-04-04 Thread Shiv Shankar
Thanks Greet. - Hi Shan, Rather than doing it on ingest, you should do the scrambling on export (note: redaction is an export option as well). Unfortunately, MLCP does not allow transformation at export, but it does allow that on copy. You could write your own transform that

[MarkLogic Dev General] Scramble production data for testing in ML 8.x

2017-04-03 Thread Shiv Shankar
Hi, I am aware we have redact option in ML9.x to scramble the data while doing ingestion using MLCP; Is there any similar options available in ML 8.x? . Any other alternative approaches to scramble the production data (sensitive data) into testing environment? Regards Shan.

[MarkLogic Dev General] Search by age wise from dob property

2017-05-22 Thread Shiv Shankar
Hi, There is a dob json property in the documents and I need to search on dob based on age wise i.e age > 30, age >30 and age <50. Any samples to calculate age and compare in the search queries? Thanks Shan. ___ General mailing list

Re: [MarkLogic Dev General] General Digest, Vol 155, Issue 24

2017-05-23 Thread Shiv Shankar
ody 'help' to > general-requ...@developer.marklogic.com > > 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...&

[MarkLogic Dev General] Ignoring empty/null values while search

2017-05-23 Thread Shiv Shankar
Hi, How can I skip empty/null values as my dob property has empty ("") string for some of the documents and below error is giving error XDMP-LEXVAL: xs.date("") -- Invalid lexical value "" Query: cts.search(cts.andQuery([cts.jsonPropertyRangeQuery("dob", '>',

[MarkLogic Dev General] Different estimates while doing search

2017-05-19 Thread Shiv Shankar
Hi, I've created a range index on ptype and ran the below queries and I am getting the difference in count. What could be the reason? Any advice? // This one is getting lesser results cts.estimate(cts.andQuery([cts.jsonPropertyRangeQuery('ptype', "=",

[MarkLogic Dev General] DataHub Issue

2017-05-31 Thread Shiv Shankar
Hi, I am getting below error when I try to load the input flow in my Linux box. Same is working in local ( Mac OS) and checked the path/file permissions. All are accessable. Any advise? ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with

Re: [MarkLogic Dev General] General Digest, Vol 155, Issue 32

2017-05-24 Thread Shiv Shankar
Thanks Gary, Looks like ML 8.5.5 /9.x doesn't have cts:maximum-value, cts:minimum-value. I tried with cts:min, cts:max, throwing XDMP-NONMIXEDCOMPLEXCONT error. Any advise? Thanks Shan. On Wed, May 24, 2017 at 7:44 AM, wrote: > Send General mailing

[MarkLogic Dev General] Error by DM SDK on ML 8.0.6

2017-09-20 Thread Shiv Shankar
Hi, I keep getting below error while loading the data from a file into ML 8.x using DataMovement SDK. Same code is working fine with 9.x. Any advice? Error. Exception in thread "main" com.marklogic.client.ResourceNotFoundException: Local message: Could not read resource at internal/forestinfo.