Re: [MarkLogic Dev General] How to test whether doc exists

2013-04-25 Thread Stu Salsbury
I think Mike answered in this case. exists(doc) is the same as fn:exists(doc) unless you mess with the default function namespace. Or maybe I'm seeing the emails out of order... Now how to find out generically which functions lock for read... I don't know for sure, but in this case the documentat

Re: [MarkLogic Dev General] How to test whether doc exists

2013-04-25 Thread Tim Finney
Hi Stu, This is a good question. exists(doc) does seem to put a read lock on the doc. I don't know how to find out which functions put read or update locks on a doc but would like to know. Best, Tim On 04/25/2013 11:10 PM, general-requ...@developer.marklogic.com wrote: > Date: Thu, 25 Apr 201

Re: [MarkLogic Dev General] How to test whether doc exists

2013-04-25 Thread Tim Finney
Thanks Mike. This is helpful to know. Tim On 04/26/2013 12:40 AM, general-requ...@developer.marklogic.com wrote: > Message: 2 > Date: Thu, 25 Apr 2013 08:42:30 -0700 > From: Michael Blakeley > Subject: Re: [MarkLogic Dev General] How to test whether doc exists > To: MarkLogic Developer Discussion

[MarkLogic Dev General] Performance issue while generation of Excel Reprot

2013-04-25 Thread Varun Varunesh
Hello All, We are using search:search method with a cts:query to find all the document which satisfy that query. After getting result we are trying to build a excel file which has fix structure based on the content of the result documents. search:search is working fine but if the result of search

Re: [MarkLogic Dev General] Record Loader - not ableloabinaryfile (pdf, images)

2013-04-25 Thread Mohanraj Chozhan
If I plan to use content pump shall I overcome this approach. Because as our requirement we doesn't know the files type present in the zip files. I understand the recordloader parameters approach. In which we can overcome this to load all files of xml, pdf and image -Original Message---

Re: [MarkLogic Dev General] How to test whether doc exists

2013-04-25 Thread Michael Blakeley
In theory xdmp:exists(doc($uri)) is fastest. However it isn't update-safe because it doesn't take a read lock. If you are writing update logic that depends on whether or not a document exists, stick with fn:exists(doc($uri)). Speed of either will depend on many factors: whether or not the docume

Re: [MarkLogic Dev General] Record Loader - not ableloabinaryfile (pdf, images)

2013-04-25 Thread Michael Blakeley
When you set DOCUMENT_FORMAT=binary, you are telling RecordLoader to load all the documents as BLOBs. Those are binary nodes, with no structure for XPath to work on. See http://developer.marklogic.com/blog/document-formats-part1 for more about MarkLogic's ability to store and work with documents

Re: [MarkLogic Dev General] Probably doing something stupid... - using modules in REST transform

2013-04-25 Thread Erik Hennum
Inquisitive MarkLogicalogists: Adding a few points worth noting ... * The default transform can be a sharp tool in that it's easy to forget that the input for a named transform can come from the unnamed default transform instead of the database. * In debugging transform extension issues, it

Re: [MarkLogic Dev General] Clarrification on Extending the Rest API using Resource Service extention

2013-04-25 Thread Erik Hennum
Hi, Manoj: Thanks for clarifying. We've wondered whether extension developers need an XQuery API for executing REST API functionality on the server. I think this use case would benefit from precisely such an XQuery API. Unfortunately, we don't have this XQuery API today. At present, your al

Re: [MarkLogic Dev General] How to test whether doc exists

2013-04-25 Thread Stu Salsbury
Concerning: exists(doc($URI)): 80 us (microseconds) doc-available($URI): 200 us Would the first option (using doc($URI)) put a read lock on the file? And the second not? Just wondering about side effects of the test. On Thu, Apr 25, 2013 at 6:21 AM, Ryan Dew wrote: > Interesting. The result

Re: [MarkLogic Dev General] Record Loader - not ableloabinaryfile (pdf, images)

2013-04-25 Thread Mohanraj Chozhan
Hi, I have some xml files, jpeg and pdf files to load to Marklogic database. Also once the xmls documents are loaded to the marklogic database I need to perform some xpath operations. I have set DOCUMENT_TYPE=binary and INPUT_PATTERN=.+\\.(PDF|JPG|pdf|jpg|[Xx][Mm][Ll])$. Obviously the problem

Re: [MarkLogic Dev General] How to test whether doc exists

2013-04-25 Thread Ryan Dew
Interesting. The results could be affected by having the document already in the caches. You might want to include non-existing documents in your test. You could also try: xdmp:exists(cts:search(fn:collection(), cts:document-query($URI))) On Apr 24, 2013 10:34 PM, "Tim Finney" wrote: > Hi Ryan,

Re: [MarkLogic Dev General] Clarrification on Extending the Rest API using Resource Service extention

2013-04-25 Thread manoj viswanadha
Hi Erik, My requirement is to use the constarints which are already configured in the REST Api in the custom module which i created using resource service extention. so can i pass the options paramenter into the Resource service and use the constarints to filter the results. consider the sample

[MarkLogic Dev General] Fwd: Tweak search:suggest

2013-04-25 Thread Mihir Das
Hi Guys, I need some suggestion to tweak search:suggest for getting result-set from two nodes. My sample query is mentioned below: xquery version "1.0-ml"; import module namespace search = "http://marklogic.com/appservices/search"; at "/MarkLogic/appservices/search/search.xqy"; let $options