[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 mailin

[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' Error

[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 curl

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

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

[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] 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. /Mark

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

2016-09-14 Thread Shiv Shankar
gs in the xqy module > /MarkLogic/cpf/actions/mimetype-condition.xqy and see what content > type/mime type is being logged. > > let $_ := xdmp:log("content-type=" || $doc-content-type) > let $_ := xdmp:log($mime-type-patterns) > > Which version of ML are you using

[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"), xdmp:comm

[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] 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. ___ Ge

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

2016-09-28 Thread Shiv Shankar
Hi Rob, I am getting XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace to update JSON attributes in FOR loop, 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
nior 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 > *Subject:* XDMP-CONFLICTINGUPDATE

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

2016-09-29 Thread Shiv Shankar
ce * 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(). > > Justin > > -- > Justin Makeig > Director, Product Management &g

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

2016-10-03 Thread Shiv Shankar
Today's Topics: > >1. Re: General Digest, Vol 147, Issue 51 (Justin Makeig) > > > -- > > Message: 1 > Date: Thu, 29 Sep 2016 16:32:44 + > From: Justin Makeig > Subject: Re: [MarkLogic Dev General] General Digest, Vol 147, Issue 51 > T

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

2016-10-03 Thread Shiv Shankar
RDS FOUND IN first collection"); } On Mon, Oct 3, 2016 at 3:28 PM, Justin Makeig 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` > com

[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() exclus

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

2016-10-17 Thread Shiv Shankar
ding inserting new ones) are accumulated whilst your code > is executing, then actually written to the database when the transaction > automatically commits, after the code has completed. > > The same query therefore cannot read a modification it has done itself. > > Regards, > > On

[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&q2=2&q3=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 wrote: > Hi, > I tried calling an external ws with xdmp:http-get() which is deployed in > local host http://localhost:8080/q1=1&q2=2&q3=3 , it is throwing as > XDMP-ENTI

[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
eveloper.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. Sharing Modules (Jangam, Yogesh CWR)

[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 mail

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

2016-11-21 Thread Shiv Shankar
edit your Subject line so it is more specific > than "Re: Contents of General digest..." > > > Today's Topics: > >1. validate epub file using XSD (Rajesh Kumar) >2. Re: validate epub file using XSD (Geert Josten) >3. validate epub file using XSD (

[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 -hos

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. Will

[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 G

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

2016-12-22 Thread Shiv Shankar
pertyValueQuery('test3', > "")).result(); > > If "empty" means the absence of a property, you can use: > > jsearch.documents().where(cts.notQuery(cts. > jsonPropertyScopeQuery('test4', cts.trueQuery(.result(); > > > Hoping tha

[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 {"$query":{"options":{"sort-order":[{"direction":"descending"

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 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":[{"direction":"

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 wrote: > Thanks Eric, > With this change, I could get the data, but no order change though the > sort-order specified ascending/descending. > Lets say firstName is "abc&q

[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={ "search":{"$query":{"$filter":true,"options":{"sort-order":[{"di

[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 General@developer.marklo

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

2017-02-08 Thread Shiv Shankar
c.com> > > This e-mail and any accompanying attachments are confidential. The > information is intended > solely for the use of the individual to whom it is addressed. Any review, > disclosure, copying, > distribution, or use of this e-mail communication by others is strictly &

[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 on

Re: [MarkLogic Dev General] Finding target geocodes using REST API

2017-02-24 Thread Shiv Shankar
circle(20, cts.point(lat, long))),cts.collectionQuery(["ADDRESS_COLLECTION"])])); Thanks Shan. --- Hi, Shiv: QBE doesn't support geospatial document vocabularies at present. You may want to raise this issue through your support contact. Erik Hennum On Fri, Feb 24, 2017 at 11:09 AM, Shiv Sha

[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": "2002-02-13T19:18:21.81

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

2017-03-17 Thread Shiv Shankar
ou 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? > > Not sure if it is relevant, but you provide a date to a dateTime query. > > Kind reg

[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. ___

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 obfuscate

[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', "=", "25"),cts.collectionQuery(["COLLECTION-1"])]

[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 General@developer.ma

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

2017-05-23 Thread Shiv Shankar
;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", '>', fn.currentDate().subtract(xs.yearMonthD

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 list submissions to > general@develop

[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 pa

[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. Se