[MarkLogic Dev General] abstract and name elements value is null when convert XML to json

2018-05-24 Thread Indrajeet Verma
Hi - I am converting XML doc to json and it was working before till today. Now suddenly and elements values are converting into "null" values. I am using custom config strategy. Have someone faced this issue before? XML: 2017-08-31T16:00:08.131792-04:00 active

Re: [MarkLogic Dev General] Search results are same w/ or w/o punctuation with unfiltered search option

2017-07-31 Thread Indrajeet Verma
marklogic.com [ > general-boun...@developer.marklogic.com] on behalf of Indrajeet Verma [ > indrajeet.ve...@gmail.com] > *Sent:* Monday, July 31, 2017 4:38 AM > *To:* MarkLogic Developer Discussion > *Subject:* [MarkLogic Dev General] Search results are same w/ or w/o > punctuatio

[MarkLogic Dev General] Search results are same w/ or w/o punctuation with unfiltered search option

2017-07-31 Thread Indrajeet Verma
Hi - The search:search() is giving same results for keyword 10, 10%, 10#%@ and $10 when I use "unfiltered" search option. Though when I use "filtered" search-option, the results are accurate and punctuation is considered in the query text. Is there any way if I can get correct results using "unfil

Re: [MarkLogic Dev General] Make string XML "safe" in xquery

2017-07-28 Thread Indrajeet Verma
Steve - Did you try using fn:replace? e.g. fn:replace(fn:replace($title, "<", "<"), ">", ">") On Sat, Jul 29, 2017 at 5:32 AM, Steve Anderson wrote: > I have a string like this: > > A title for the product > > and I'd like to replace it with > > A title for the product > >

Re: [MarkLogic Dev General] MLCP Error Return

2017-05-12 Thread Indrajeet Verma
Hi Tim - As per my understanding there is nothing by which you can return success/failure. Other developers can guide you if anything is there in mlcp. However your problem should solve using thread count property with value 1 in your option file. -thread_count 1 Regards, Indy On Fri, May 12, 2

Re: [MarkLogic Dev General] Is xdml:unquote appropriate for handling accent characters?

2017-02-08 Thread Indrajeet Verma
tidy($Str, xhtml>yes > > )[2]/xhtml:html/xhtml:body/node() > > return $Str > > }; > > > > *From: * on behalf of Indrajeet > Verma > *Reply-To: *MarkLogic > *Date: *Wednesday, February 8, 2017 at 10:28 AM > > *To: *MarkL

Re: [MarkLogic Dev General] Is xdml:unquote appropriate for handling accent characters?

2017-02-08 Thread Indrajeet Verma
See if this works for you. declare namespace xhtml = "http://www.w3.org/1999/xhtml";; xdmp:tidy($Str, yes )[2]/xhtml:html/xhtml:body/node() Regards, Indy On Wed, Feb 8, 2017 at 11:40 PM, Kari Cowan wrote: > I guess I can make it palatable with the function I added below – the

Re: [MarkLogic Dev General] MLCP

2016-12-30 Thread Indrajeet Verma
f split to 1? > > > Regards, > Arvind Kr. > > > > > On Thu, Dec 29, 2016 at 7:17 PM, Indrajeet Verma < > indrajeet.ve...@gmail.com> wrote: > >> Arvind - Have you tried with -THREAD_COUNT=1? I know using thread count = >> 1 will take time to update docs but d

Re: [MarkLogic Dev General] Load single file

2016-12-29 Thread Indrajeet Verma
DIR Path should be *C:\3A Docs\Big-Data Projects RFP\NoSQL* On Thu, Dec 29, 2016 at 7:13 PM, Indrajeet Verma wrote: > Ahmed - If this is not resolved yet. Please try like below and make sure > this dir is present in your file-system. Now you drop a file in this dir > and upload. As pe

Re: [MarkLogic Dev General] MLCP

2016-12-29 Thread Indrajeet Verma
Arvind - Have you tried with -THREAD_COUNT=1? I know using thread count = 1 will take time to update docs but deadlock could be avoided. Thanks! On Wed, Dec 28, 2016 at 3:56 PM, Arvind Kumar wrote: > Hi Jason, > > Thanks for your response. > > The problem is the no. of records processed is not

[MarkLogic Dev General] Load single file

2016-12-29 Thread Indrajeet Verma
Ahmed - If this is not resolved yet. Please try like below and make sure this dir is present in your file-system. Now you drop a file in this dir and upload. As per docs it accepts DIR not file. Directory Loader Configuration Directory path Thanks On Tue, Dec 27, 2016 at 11:58 AM, Ahmed Khan <20

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

2016-10-05 Thread Indrajeet Verma
Hi Vinod, Can you try IOUtils and set UTF-8 encoding? I used it in one of my project and works fine. HttpResponse response = client.execute(getReq);// execute get request response.setHeader("Content-Type", "text/html; charset=utf-8"); result = IOUtils.toString(response.getEntity().getContent(), "

Re: [MarkLogic Dev General] Regarding retrieving nonblocking-timestamp for the replica database forests

2016-10-05 Thread Indrajeet Verma
-id) return xdmp:set($nconfig-orig, $nconfig) else () let $_ := admin:save-configuration($nconfig-orig) return "Rollback is done!" } catch($e){ ( $e , xdmp:log($e, "debug") ) } Thank you for your help! Rega

[MarkLogic Dev General] Regarding retrieving nonblocking-timestamp for the replica database forests

2016-10-04 Thread Indrajeet Verma
Hi All, We have configured database replication in a database in which there are 3 forests and we want to write a script to make DR host same database to ready for updates in case master host is down. As per documentation: After you fail over your applications to a Replica database, each Replica

Re: [MarkLogic Dev General] Code complexity survey

2016-09-22 Thread Indrajeet Verma
I did it as well. Yes it takes 5 to 10 minutes only. Regards, Indy On 22-Sep-2016 7:19 pm, "Geert Josten" wrote: > I’ve submitted my answers, good luck with your survey. Anyone else up for > it? It really takes only 5 to 10 minutes.. > > Cheers > > From: on behalf of Vard > Antinyan > Reply-T

Re: [MarkLogic Dev General] How does "xdmp:collection-delete" work?

2016-09-19 Thread Indrajeet Verma
ke sure merging does not slow down > deletion itself.. > > Cheers, > Geert > > From: on behalf of Indrajeet > Verma > Reply-To: MarkLogic Developer Discussion > Date: Monday, September 19, 2016 at 5:36 PM > To: MarkLogic Developer Discussion > Subject: Re: [MarkLog

Re: [MarkLogic Dev General] How does "xdmp:collection-delete" work?

2016-09-19 Thread Indrajeet Verma
Hi Geert, In addition, do you think he should run manual merge after deleting 20M to free the space and improve performance? Regards, Indy On Mon, Sep 19, 2016 at 8:58 PM, Geert Josten wrote: > Hi Qambar, > > I think it makes sense to discuss this in more detail here first, and then > see if w

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

2016-09-15 Thread Indrajeet Verma
Shiv, Your XQuery code had some issues. See attached corrected pipeline and action module code. Also try to change log level from "debug" to "fine" to see more logs. Regards, Indy On Wed, Sep 14, 2016 at 11:09 AM, Indrajeet Verma wrote: > Hey Shiv, > > It&#

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

2016-09-14 Thread Indrajeet Verma
edit your Subject line so it is more specific >> than "Re: Contents of General digest..." >> >> >> Today's Topics: >> >>1. Re: modules, conditions to validate JSON documents in CPF >>

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

2016-09-13 Thread Indrajeet Verma
Hey Shiv, It's working fine to me with json documents as well. If you can send your complete pipeline, I may try to point out issue. You may try to set log level "fine" and can see more granular level logs. You might catch the issues your own. Also you may try adding logs in the xqy module /Mark

Re: [MarkLogic Dev General] #CGP#RE: Need Technical Support

2016-07-15 Thread Indrajeet Verma
Hi Udaya, As per my understanding you should always use latest version of ML if you are installing from scratch. The latest version of ML (MarkLogic-8.0-5.4) is available here https://developer.marklogic.com/products. Did you follow all the installation steps of MarkLogic those are mentioned here

Re: [MarkLogic Dev General] mlcp and loading multiple files

2016-07-03 Thread Indrajeet Verma
Hey Hans, Not completely sure however could you try to load files again by defining thread count properties equal to 1 in your mlcp import config file and see the results? -thread_count 1 Regards, Indy On Sun, Jul 3, 2016 at 11:22 PM, Hans Hübner wrote: > Hi, > > I'm trying to load a bunch of

Re: [MarkLogic Dev General] Speeding up access to large XML file

2016-06-23 Thread Indrajeet Verma
You can try with path range indexes as well and see which query will give you fast results. Go through page no 29 and 30 of the pdf "inside-marklogic-server-r7.pdf" for more information Regards, Indy On Thu, Jun 23, 2016 at 1:12 PM, Indrajeet Verma wrote: > Hi Hans, > &g

Re: [MarkLogic Dev General] Speeding up access to large XML file

2016-06-23 Thread Indrajeet Verma
:and-query((cts:document-query("file1.xml"), > cts:element-value-query(fn:QName("","j"), "123", ("lang=en"), 1)), ())) -- > No element range index for k http://marklogic.com/collation/ > > I will work myself from here, but any su

Re: [MarkLogic Dev General] Speeding up access to large XML file

2016-06-22 Thread Indrajeet Verma
Hi Hans, You might try below code and see if that helps in improving the performance. You need to create range indexes on elements "j", "k", "d" and "f". BTW what values the elements "k" and "f" does contain? Is it numeric, string or sentences ? If it contains para/sentences then you should think

Re: [MarkLogic Dev General] Validation error when loading pipeline with options via Management API

2016-06-22 Thread Indrajeet Verma
ant to use the management API as the admin UI requires file system > access on the server where MarkLogic and this will not always be available > to us. > > Rob > > > On 22 June 2016 at 10:05, Indrajeet Verma > wrote: > >> Hi Rob, >> >> Have you tried

Re: [MarkLogic Dev General] Validation error when loading pipeline with options via Management API

2016-06-22 Thread Indrajeet Verma
Hi Rob, Have you tried to load pipeline via admin UI and seeing same error? I am using ML8.0-4 and below code works with the options however I have loaded pipeline via UI. When a document is zip, http://marklogic.com/states/initial http://marklo

Re: [MarkLogic Dev General] Sort by last modified in search:search()

2016-05-12 Thread Indrajeet Verma
Hi Soumadri, Have you tried using OPTIONS? If not please see below and try to create it based on your requirement and pass it into search:search(). I think this should give you sorted results. declare variable $SEARCH-OPTIONS := http://marklogic.com/appservices/search";> unfiltered 10

Re: [MarkLogic Dev General] Database Restore Errorhis

2016-03-30 Thread Indrajeet Verma
One correction, Path should be like, </<>/<> On Wed, Mar 30, 2016 at 5:35 PM, Indrajeet Verma wrote: > Hi Aganan, > > Did you give the path till a number like <>/<> > (e.g. <>/20160315-141620826) in the restore from directory > input field whi

Re: [MarkLogic Dev General] Database Restore Errorhis

2016-03-30 Thread Indrajeet Verma
Hi Aganan, Did you give the path till a number like <>/<> (e.g. <>/20160315-141620826) in the restore from directory input field while restoring the DB? Error says, your backup dir is empty. Regards, Indy On Wed, Mar 30, 2016 at 3:15 PM, Aganan, Rufel wrote: > I am trying to restore a p

Re: [MarkLogic Dev General] Regarding running ML on AWS and using the pay-as-you-go payment model

2016-03-09 Thread Indrajeet Verma
oper.marklogic.com] *On Behalf Of *Indrajeet Verma > *Sent:* Wednesday, March 09, 2016 7:01 AM > *To:* MarkLogic Developer Discussion > *Subject:* [MarkLogic Dev General] Regarding running ML on AWS and using > the pay-as-you-go payment model > > > > Hi All, > > > >

[MarkLogic Dev General] Regarding running ML on AWS and using the pay-as-you-go payment model

2016-03-09 Thread Indrajeet Verma
Hi All, Is there anyone running ML on AWS and using the pay-as-you-go payment model described on http://www.marklogic.com/what-is-marklogic/pricing/? and if it includes access to MarkLogic Support? Could you please share your findings and suggestions? Regards, Indrajeet

Re: [MarkLogic Dev General] Regarding Error

2016-02-15 Thread Indrajeet Verma
Hi Siva, BTW what do you want to achieve? You can't use fn:concat($file//dir:pathname/text()) in this way. Please refer https://docs.marklogic.com/fn:concat. Might be you use fn:string-join() instead however not sure about your requirement. e.g let $file := xdmp:filesystem-directory($DIR_URI) l

Re: [MarkLogic Dev General] json:transform-to-json() with custom configuration is suppressing some content in XML to JSON transformation

2016-01-02 Thread Indrajeet Verma
fidelity , can be post > processed > To your final desired form > > > > > Sent from my iPad > David A Lee > d...@marklogic.com > > > On Jan 2, 2016, at 1:15 PM, Indrajeet Verma > wrote: > > Hi, > > I am using json:transform-to-json() function to

[MarkLogic Dev General] json:transform-to-json() with custom configuration is suppressing some content in XML to JSON transformation

2016-01-02 Thread Indrajeet Verma
Hi, I am using json:transform-to-json() function to convert XML node to json however for a nested xml node and with custom configuration, this function is suppressing some content. Could you please suggest where I am doing mistake or this is not the right conversion (json is not fit for mixed con

Re: [MarkLogic Dev General] searching for word where uppercase letter can occur anywhere in the word

2015-11-25 Thread Indrajeet Verma
Hey Amish, Might be someone has better option however I can think of maintaining a thesaurus for all type of possible combinations with upper case letter and do the exact search for other elements except lower case. Also you approach might fail incase, any word with upper case letter might be pr

Re: [MarkLogic Dev General] SEARCH-BADORDERBY

2015-11-25 Thread Indrajeet Verma
As per my understanding, ML8 onwards, whatever element you use for sorting that should have range index. On Wed, Nov 25, 2015 at 11:37 PM, Indrajeet Verma wrote: > Hey, > > I have faced this type of issue while upgrading to ML8 and I solved it > creating range index only. D

Re: [MarkLogic Dev General] SEARCH-BADORDERBY

2015-11-25 Thread Indrajeet Verma
ctly > prohibited. > > Elevate Credit International Limited is registered in England & Wales with > Company Number 05041905. Registered Office: 27-28 Eastcastle Street, > London, W1W 8DH > > > > On 25 Nov 2015, at 17:40, Indrajeet Verma > wrote: > > Have yo

Re: [MarkLogic Dev General] SEARCH-BADORDERBY

2015-11-25 Thread Indrajeet Verma
Have you created range index on element "insert_timestamp" type of dateTime and without namespace? Regards, Indy On Wed, Nov 25, 2015 at 9:44 PM, Ashley Peacock wrote: > Just to add to the below, I removed the index I added and re-ran the > check-options and it comes up with a suggestion for an

Re: [MarkLogic Dev General] $counter < i -- I might be overthinking this

2015-11-16 Thread Indrajeet Verma
Cowan, There is a function fn:last() which returns an integer value that represents the number of items in the current context. Please refer https://docs.marklogic.com/fn:last. See if that works for you. Another approach could be, you can get the count of your results and add the condition like $

Re: [MarkLogic Dev General] Error while trying to load a XML to a ML Server from network

2015-08-11 Thread Indrajeet Verma
Sanajya - I realized my code will also not work for you. Regards, Indy On Tue, Aug 11, 2015 at 7:28 PM, Indrajeet Verma wrote: > Sanjay, > > Did you try using xdmp:document-get() and xdmp:document-insert(), > > let $doc := xdmp:document-get($loc) > return xdmp:document

Re: [MarkLogic Dev General] Error while trying to load a XML to a ML Server from network

2015-08-11 Thread Indrajeet Verma
Sanjay, Did you try using xdmp:document-get() and xdmp:document-insert(), let $doc := xdmp:document-get($loc) return xdmp:document-insert($uri, $odc,$permissions.) Regards, Indy On Tue, Aug 11, 2015 at 7:20 PM, Sanjaya Keshari Dash < sanjaya_d...@infosys.com> wrote: > Hi All, > > > > we h

Re: [MarkLogic Dev General] Regarding Excluding a node from search

2015-07-23 Thread Indrajeet Verma
In addition of my email, I have tried to create phrase arounds and re-indexing is happening for my db. Regards, Indy On Thu, Jul 23, 2015 at 7:45 PM, Indrajeet Verma wrote: > Thank you All for your suggestions! > > I am using cts:element, cts:word and cts:range querie

Re: [MarkLogic Dev General] Regarding Excluding a node from search

2015-07-23 Thread Indrajeet Verma
> Geert > > From: on behalf of Indrajeet > Verma > Reply-To: MarkLogic Developer Discussion > Date: Thursday, July 23, 2015 at 3:57 PM > To: MarkLogic Developer Discussion > Subject: [MarkLogic Dev General] Regarding Excluding a node from search > > Hi All, > >

[MarkLogic Dev General] Regarding Excluding a node from search

2015-07-23 Thread Indrajeet Verma
Hi All, I am doing free text search by using search libraries. I am using search:search/search:resolve etc.. We have elements inside documents and I don't want to include these nodes in my search. e.g. If I search Effective , this should not return result. If I search confidential , this shoul

Re: [MarkLogic Dev General] Need to remove unused xml namespace prefix

2015-07-22 Thread Indrajeet Verma
Hi Raghu, Can you try this and see if works for you? declare namespace ns="http://somewhere.something.com";; xdmp:document-insert ( "/text.xml", http://anywhere.anything.com";> ); declare function local:reparse-doc($node) { typeswitch($node) case document-node() return local:reparse-doc

Re: [MarkLogic Dev General] Displaying document after an update

2015-07-18 Thread Indrajeet Verma
Thank you Eric. I had also a similar kind of requirement however I was first retrieving full document from db and manipulating in the memory then replacing whole document and returning the document that is in the memory to API. I will try this and see if it gives better performance. Though my doc

Re: [MarkLogic Dev General] cts:element-values is not returning result in input order

2015-07-16 Thread Indrajeet Verma
r element. > > You could do something like: > cts:element-value-co-occurrences(xs:QName("TS"),xs:QName("Searchable-Value"),("limit=10","fragment-frequency","item-order","concurrent"))!fn:data(.//cts:value[2]) > > That orders t

Re: [MarkLogic Dev General] cts:element-values is not returning result in input order

2015-07-16 Thread Indrajeet Verma
,"CIK":"86115","TS":"A"} XML document 3 CRUCELL NV AB {"CompanyName":"CRUCELL NV","CIK":"1126136","TS":"AB"} . On Thu, Jul 16, 2015 at 10:47 PM, Indrajeet Verma wrote: &g

[MarkLogic Dev General] cts:element-values is not returning result in input order

2015-07-16 Thread Indrajeet Verma
Hi All, I am using cts:element-values() to return suggestions based on the input char/string and its other matches and I want the result in order of input. If I entered A, the match of A should come first and then matches of others. Please help me to correct my code! Query- --- let $query := cts

Re: [MarkLogic Dev General] XDMP-EXPNTREECACHEFULL error

2015-07-02 Thread Indrajeet Verma
("report_date"), > ">=", xs:dateTime("2010-09-25T00:00:00.000")), > > > cts:element-attribute-range-query(xs:QName("lab_report"),xs:QName("report_date"), > "<=", xs:dateTime("2014-09-25T00:00:00.000&q

Re: [MarkLogic Dev General] how to update the attribute of nodes?

2015-07-01 Thread Indrajeet Verma
tion <http://www.marklogic.com/> > http://developer.marklogic.com/ > > > From: Indrajeet Verma > Reply-To: MarkLogic Developer Discussion > Date: Wednesday, July 1, 2015 at 1:21 AM > To: MarkLogic Developer Discussion > Subject: Re: [MarkLogic Dev General] ho

Re: [MarkLogic Dev General] XDMP-EXPNTREECACHEFULL error

2015-06-30 Thread Indrajeet Verma
In Addition of Asit response, You should go with cts:element-values() and you should create cts:and-query and inside it cts:range-query for the dates and flag. Create range index for lab_report, report_date and delete_flag. Let me know if you want any help in creating query. Regards, Indy On W

Re: [MarkLogic Dev General] how to update the attribute of nodes?

2015-06-30 Thread Indrajeet Verma
Hi Zise, You can try below code as well, xdmp:node-replace(/catalog/product/name/@language, attribute language {"chinese"}) Regards, Indy On Wed, Jul 1, 2015 at 10:37 AM, Asit Nautiyal wrote: > Hi Zise, > > There are various ways to do this simple task. Find the below sample code : > > let $d

Re: [MarkLogic Dev General] Convert element text to node in XSL

2015-06-30 Thread Indrajeet Verma
Hi Gary, Will that work for you OR do you expect anything else? http://www.w3.org/1999/XSL/Transform"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; exclude-result-prefixes="xs" version="2.0"> OR http://www.w3.org/1999/XSL/Transform";

Re: [MarkLogic Dev General] Can anyone tell me why the result of the second xqery is empy?

2015-06-29 Thread Indrajeet Verma
Geert, I was looking into the difference between eq and = in MarkLogic and found one article and it says "in the "1.0-ml" version of XQuery, there's no difference in behavior. eq behaves the same as =, etc." for more information please refer " https://developer.marklogic.com/blog/comparison-operat

Re: [MarkLogic Dev General] Can anyone tell me why the result of the second xqery is empy?

2015-06-28 Thread Indrajeet Verma
Hi Zise, Use below query to avoid any loop or don't want any order by, collection('http://marklogic.com/xdmp/test')/catalog/product[@dept = 'WMN']/name However I would suggest to use of cts queries for the better response time. Regards, Indy On Mon, Jun 29, 2015 at 11:18 AM, Asit Nautiyal wro

Re: [MarkLogic Dev General] cts query question

2015-06-26 Thread Indrajeet Verma
Hi Chunyu, Cts:element-query does, Returns a cts:query matching elements by name with the content constrained by the given cts:query in the second parameter. Searches for matches in the *specified element and all of its descendants.* If the specified query in the second parameter has any cts:elem

Re: [MarkLogic Dev General] MarkLogic Database size per collection

2015-06-23 Thread Indrajeet Verma
Hi Vishal, In addition to link shared by Asit, go through https://developer.marklogic.com/pubs/architecture/inside-marklogic-server-r7.pdf the link as well. Though there are a lot of things to make system faster however in the starting of your project, I would suggest, you should focus on the dat

Re: [MarkLogic Dev General] TaskServer: state is already successor so not updating for /alerts/email/15835948930718685389.xml

2015-06-16 Thread Indrajeet Verma
se states. > > //Mary > > Aside: You can name the states anything you want, by the way, they don't > have to start with "http://marklogic.com/states/";. That is just our > convention for our own states. You can use any URI you like. > > > > > You can check

[MarkLogic Dev General] TaskServer: state is already successor so not updating for /alerts/email/15835948930718685389.xml

2015-06-04 Thread Indrajeet Verma
Hi, We have alert configured in our server and when any file inserts into /alert/email/<> the email sent to specified user. However after upgrading ML from 6 to 8, the below messages started coming TaskServer: state is already successor so not updating for /alerts/email/15835948930718685389.xml

[MarkLogic Dev General] Mount Db error while ML upgrade from 6 to 8

2015-06-04 Thread Indrajeet Verma
Hi, Please help me if somebody has faced below issue while upgrading ML from 6 to 8. This forest is unavailable due to the following error: XDMP-FORESTERR: Error in startup of forest FilingsTool-Content: XDMP-RECOVERY: Recovery error on forest FilingsTool-Content after 27697 redo records -- {{fsn

Re: [MarkLogic Dev General] XDMP:BADPINAME while doing an xdmp:unquote

2015-06-03 Thread Indrajeet Verma
Hi Raghu, Can you send the content for which you are doing xdmp:unquote(). It seems some issues related to processing instructions that are inside content. Regards, Indy : On Wed, Jun 3, 2015 at 7:36 PM, Raghu wrote: > Hi all, > > > > ___ > General m

Re: [MarkLogic Dev General] query on xml

2015-05-15 Thread Indrajeet Verma
in result means – like below structure >> >> >> >> >> >> >> >> >> >> -- >> >> -- >> >>

Re: [MarkLogic Dev General] query on xml

2015-05-14 Thread Indrajeet Verma
Pragya, See if below code works for you. If your input can contain only two elements combination, Try below code changes in Raja's code, declare function local:transform($result as node()){ let $elements := fn:distinct-values($result/child::*/name(.)) for $token_one in $result/*[name(.) eq ($e

Re: [MarkLogic Dev General] xdmp:node-replace

2015-05-12 Thread Indrajeet Verma
Hi Kary, Send us the XML samples along with your code snippet (that you want to perform exactly). I can help you to make it works. Regards, Indy On Tue, May 12, 2015 at 9:11 PM, Christopher Hamlin wrote: > Hi, > > You can't make two changes to the same node, but somehow that is what > is happe

Re: [MarkLogic Dev General] Forest Warning

2015-05-11 Thread Indrajeet Verma
7;t help, because they'll all have the same > in-memory limits and the rebalancer will run into the same issue as the > reindexer if it tries to move the document to a different forest. > > Wayne. > > > > On 05/11/2015 11:18 AM, Indrajeet Verma wrote: > > Shashi, &

Re: [MarkLogic Dev General] XDMP-FRAGTOOLARGE

2015-05-11 Thread Indrajeet Verma
Shashi, I think you should see your logic of splitting/loading of the XML document. What method/tool are you using to ingest content (mlcp and recordloader etc...) You can write your logic to split files based on a element which you want to create a root element. Also please take a look the sugge

Re: [MarkLogic Dev General] Forest Warning

2015-05-11 Thread Indrajeet Verma
Shashi, I am sure, this file size must be large. This is not good that you have created only one forest. There should be more than that. I would recommend around 8-10 forests. However these should be based on core of CPUs. per 2 core 1 forest but if your server is having 32 cores, 8-10 forest sh

Re: [MarkLogic Dev General] Searching elements

2015-05-05 Thread Indrajeet Verma
Hi Chad Bishop, *You can try using cts:element-values() as well to get distinct subject values based on your input,*let $qtext := "whatever search"let $terms := fn:tokenize($qtext," ")let $q := cts:and-query(( cts:collection-query("content"), cts:element-attribute-value-query(xs:QName("subj-g

Re: [MarkLogic Dev General] json namespace changes in json:transform-from-json($input)

2015-05-05 Thread Indrajeet Verma
et-request-body()/node() instance of text()) then xdmp:quote(xdmp:get-request-body()/node()) else if (xdmp:get-request-body()/node() instance of object-node()) then xdmp:to-json(xdmp:get-request-body()/node())/node() else () ) ) On Tue, May 5, 2015 at 2:22 PM, Indrajeet Verma wrote: > Hi David,

Re: [MarkLogic Dev General] json namespace changes in json:transform-from-json($input)

2015-05-05 Thread Indrajeet Verma
----- > > David Lee > Lead Engineer > *Mark**Logic* Corporation > d...@marklogic.com > Phone: +1 812-482-5224 > > Cell: +1 812-630-7622 > www.marklogic.com > > > > *From:* general-boun...@deve

Re: [MarkLogic Dev General] json namespace changes in json:transform-from-json($input)

2015-05-04 Thread Indrajeet Verma
t; you describe you wanted. > > Since you don't reference exactly what it is that you are having problems > with, its hard to guess ... > > Could you explain what issues you are having ? > > Where is this document used ? > > could you show the XQuery code that uses it? &g

Re: [MarkLogic Dev General] json namespace changes in json:transform-from-json($input)

2015-05-04 Thread Indrajeet Verma
> d...@marklogic.com > Phone: +1 812-482-5224 > > Cell: +1 812-630-7622 > www.marklogic.com > > > > *From:* general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] *On Behalf Of *Erik Hennum > *Sent:* Monday, May 04, 2015 9:16 AM > *To:* Mar

Re: [MarkLogic Dev General] json namespace changes in json:transform-from-json($input)

2015-05-04 Thread Indrajeet Verma
> Hi, Indrajeet: > > In MarkLogic 8, you would typically store JSON directly as native JSON and > not converted to XML. The direct approach will improve performance and > maintainability. > > In the particular case, xdmp:unquote() will turn the input string into a > JSON

[MarkLogic Dev General] json namespace changes in json:transform-from-json($input)

2015-05-04 Thread Indrajeet Verma
Hi, While upgrading ML6 to ML8, I needed to modify the JSON format and I did it based on my understanding on ML8 JSON handling however my senior is not convince with this solution so wanted to know if my approach is not best fit and could be better solution. Please someone take a look on my cod

Re: [MarkLogic Dev General] XDMP-TOOMANYSTANDS

2015-05-01 Thread Indrajeet Verma
Hi Shashi, I agree with Christopher. I also suspect, you might have only one forest and data size is large, ingestion is high and your merge policy is not set-up properly to clean deleted fragments. Could you tell me how many deleted fragments in your forest? To fix this issue right now, I think

Re: [MarkLogic Dev General] SEARCH-BADORDERBY

2015-04-30 Thread Indrajeet Verma
;t specify a "collation" attribute if the sortby index is not of type > string. > > Also, if the index is of type int, you should use "xs:int", not > "xs:integer" for sort-order/@type. > > Regards, > Danny > > > On Thu, Apr 30, 2015

Re: [MarkLogic Dev General] SEARCH-BADORDERBY

2015-04-29 Thread Indrajeet Verma
t; http://docs.marklogic.com/search:search?q=search:search&v=8.0&api=true#opt-sort-order > > Thanks. > > -jb > > From: Indrajeet Verma > Reply-To: MarkLogic Developer Discussion > Date: Thursday, April 30, 2015 at 1:24 AM > To: MarkLogic Developer Discussion > Subje

[MarkLogic Dev General] SEARCH-BADORDERBY

2015-04-29 Thread Indrajeet Verma
Hi, I was having issues in ML8 as SEARCH-BADORDERBY: (err:FOER) Indexes are required to support element, element-attribute, json-property, or field sort specifications. So I created range index for the element "name" as It was being used in I just wanted to confirm whether range index are m

Re: [MarkLogic Dev General] Error in getting map keys in ML8

2015-04-28 Thread Indrajeet Verma
of a map to map: > > return map:keys(map:map($params)) > > Thanks. > > -jb > > From: Indrajeet Verma > Reply-To: MarkLogic Developer Discussion > Date: Tuesday, April 28, 2015 at 3:05 PM > To: MarkLogic Developer Discussion > Subject: [MarkLogic Dev General] Er

[MarkLogic Dev General] Error in getting map keys in ML8

2015-04-28 Thread Indrajeet Verma
Hi, Could somebody help me what I am missing in below query. I am using this code in ML8 let $params := http://marklogic.com/xdmp/map"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xs="http://www.w3.org/2001/XMLSchema";>

Re: [MarkLogic Dev General] JSON sending in the request body is not being converted into map:map in ML8 using roxy however working fine with ML6

2015-04-28 Thread Indrajeet Verma
* Corporation > d...@marklogic.com > Phone: +1 812-482-5224 > > Cell: +1 812-630-7622 > www.marklogic.com > > > > *From:* general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] *On Behalf Of *Indrajeet Verma > *Sent:* Tuesday, April 28,

[MarkLogic Dev General] JSON sending in the request body is not being converted into map:map in ML8 using roxy however working fine with ML6

2015-04-28 Thread Indrajeet Verma
Hi, Please help us if you have encountered same kind of problem. We are upgrading ML6 to ML8 and using roxy as well. The roxy is customized based on the customer requirement. For one of the REST request "/setcache", we are sending below data to cache and that is being converted into map (key va

Re: [MarkLogic Dev General] snip:truncate-text() has been renamed to snip:truncate( ) in ML8

2015-04-22 Thread Indrajeet Verma
e but for future upgrades as well). > > > Erik Hennum > >-- > *From:* general-boun...@developer.marklogic.com [ > general-boun...@developer.marklogic.com] on behalf of Indrajeet Verma [ > indrajeet.ve...@gmail.com] > *Sent:* Wednesday, April 22

Re: [MarkLogic Dev General] XDMP:SPAWN - Load Distribution Issue

2015-04-22 Thread Indrajeet Verma
If you are using Java to call XQuery modules via XDBC, you can use MarkLogic provided Java code with round robin approach to send requests to ML nodes. However corb/recordloader are nice to use for ingestion/bulk upload. Regards, Indrajeet On Wed, Apr 22, 2015 at 5:20 PM, Dave Cassel wrote: >

Re: [MarkLogic Dev General] XDMP:SPAWN - Load Distribution Issue

2015-04-22 Thread Indrajeet Verma
If you are using Java to call XQuery modules via XDBC, you can use MarkLogic provided Java code with round robin approach to send requests to ML nodes. However corb/recordloader are nice to use for ingestion/bulk upload and easy to configure Regards, Indrajeet On Wed, Apr 22, 2015 at 5:20 PM, Da

[MarkLogic Dev General] snip:truncate-text() has been renamed to snip:truncate( ) in ML8

2015-04-22 Thread Indrajeet Verma
Hi, We are using snip:truncate-text() in our code in ML6 and after upgrading it to ML8, It is showing XDMP-UNDFUN: (err:XPST0017) Undefined function snip:truncate-text(). We looked into below module and found this function has been modified . We found similar function snip:truncate(). import modu

Re: [MarkLogic Dev General] Wildcarded author search

2015-04-21 Thread Indrajeet Verma
Hi Danny, I am not sure if below query fits in your requirement however see if this can. You can create your search:query based on your need and also enhance $options declare variable $OPTIONS := http://marklogic.com/appservices/search";> /contrib-group/contrib[@contrib-type='au

Re: [MarkLogic Dev General] Converting date format using xquery?

2015-04-21 Thread Indrajeet Verma
Hi Mark, Could you try this. Hope this should replace your date value. declare namespace xh="http://newnamespace/";; for $t in (/xh:TABLE)/xh:CURRENTDATE let $tt := $t/string let $parts := fn:tokenize($t, " ") let $datepart := fn:tokenize($parts[1], "/") let $timestamp := fn:concat($datepart[3],"

Re: [MarkLogic Dev General] Upgrade ML6 to ML8

2015-04-21 Thread Indrajeet Verma
We are using, - ROXY - RecordLoader - XQSync - Corb Regards, Indrajeet On Tue, Apr 21, 2015 at 6:15 PM, Indrajeet Verma wrote: > Thank you Danny & Asit for your suggestions! > > Regards, > Indy > > On Tue, Apr 21, 2015 at 5:55 PM, Danny Sinang wrote: &

Re: [MarkLogic Dev General] Upgrade ML6 to ML8

2015-04-21 Thread Indrajeet Verma
ar to be more forgiving in that they overlook > the presence of the collation element for sort-order types of xs:int : > > http://marklogic.com/collation/"; xmlns=" > http://marklogic.com/appservices/search";> name="qId"/> > > > ML8 seems to b

[MarkLogic Dev General] Upgrade ML6 to ML8

2015-04-21 Thread Indrajeet Verma
Hi, We are upgrading ML6 to ML8 and gone through release notes of ML7 & ML8 for the incapability between 6 and 8. Just wondering if someone has done this activity already and could share his findings/suggestions. Thank you! ___ General mailing list Ge

Re: [MarkLogic Dev General] How to find particular element using path index

2015-04-13 Thread Indrajeet Verma
Thank you Geert! On Mon, Apr 13, 2015 at 7:57 PM, Geert Josten wrote: > Hi, > > Using / makes it work for only one path. Using // or nothing in front > means the same. I don’t really have a preference myself.. > > Cheers, > Geert > > From: Indrajeet Verma >

Re: [MarkLogic Dev General] How to find particular element using path index

2015-04-13 Thread Indrajeet Verma
T match > expressions, as opposed to XSLT select expressions. > > Kind regards, > Geert > > From: Indrajeet Verma > Reply-To: MarkLogic Developer Discussion > Date: Sunday, April 12, 2015 at 8:52 PM > To: MarkLogic Developer Discussion > Subject: Re: [MarkLogic Dev

Re: [MarkLogic Dev General] How to find particular element using path index

2015-04-12 Thread Indrajeet Verma
Shashidhar - It's nice to hear that your problem solved. This should work with //product-reference/product-id/date as well. Main point is your path should point/return the value that you are trying to search/get. As per my understanding this should be proper XPath that is searchable. On Mon, Apr

Re: [MarkLogic Dev General] How to find particular element using path index

2015-04-12 Thread Indrajeet Verma
Shashidhar - I think, your path range index is not right. I did below steps and showing result. Please see if this helps. XML- --- IND AA-503 apparel 20130105 JP 8369 20120906 CODE- -- import module namespa

Re: [MarkLogic Dev General] DISK space error

2015-04-11 Thread Indrajeet Verma
To know more about Forests and other performance improvements, you can refer https://developer.marklogic.com/pubs/architecture/inside-marklogic-server-r7.pdf On Sat, Apr 11, 2015 at 12:46 PM, Shashidhar Rao wrote: > Thanks to all experts who have given me suggestions really appreciate your > hel

Re: [MarkLogic Dev General] last inserted or modified document

2015-04-09 Thread Indrajeet Verma
Sudhakar, I saw a very useful code by using built in xdmp:document index if you create file name in sequence. Please see the link that Asit shared with you. However I am not sure if this will be fit in you requirement. Code looks like, This code is written by jimfuller2012

Re: [MarkLogic Dev General] text() Vs String() Vs data()

2015-04-09 Thread Indrajeet Verma
/node()[fn:normalize-space(.) ne '']) Please note, performance will be poor in these cases Please don't use $x//string() or $x//data(), It will give you multiple results based on element hierarchy. On Thu, Apr 9, 2015 at 1:17 PM, Indrajeet Verma wrote: > Rahul - I am not comple

  1   2   >