Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-11-15 Thread Raghu
No I didn't mean that way. Sorry no offence meant. My point is I suspected
everything but triggers!

On Tue, Nov 15, 2011 at 11:16 PM, Danny Sokolsky 
danny.sokol...@marklogic.com wrote:

 I am not sure that is weird behavior.  If you have a delete trigger that
 has a lot of work to do, for example, that would certainly impact the
 performance of deletes.  So it all depends on the totality of what is going
 on in your environment.

 ** **

 -Danny 

 ** **

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Tuesday, November 15, 2011 9:43 AM

 *To:* General MarkLogic Developer Discussion
 *Subject:* Re: [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

 ** **

 Hey Danny,

 Seems that I'd set triggers to triggers database and this
 was causing xdmp:directory-delete() not to work. Hope you had fixed this. I
 would have never suspected that triggers would have such an impact. weird
 behavior isn't it? 

 ** **

 Cheers

 Raghu

 On Tue, Oct 25, 2011 at 9:41 PM, Danny Sokolsky 
 danny.sokol...@marklogic.com wrote:

 Hi Raghu,

  

 That sounds right because in 4.2, there were a number of inconsistencies
 in the way MarkLogic handled directory and property deletes that were
 fixed.  This was to support standalone properties (a property with no
 corresponding document at the same URI).

  

 You can use a combination of the URI lexicon (cts:uri-match) and
 xdmp:document-delete to accomplish the same thing when you do not have the
 directories in your database.  Something like (this is untested):

  

 for $x in cts:uri-match(“/my/dir/*”)

 return

 xdmp:document-delete($x)

  

 -Danny

  

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Tuesday, October 25, 2011 6:36 AM


 *To:* General MarkLogic Developer Discussion

 *Subject:* Re: [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

  

  

 HI Danny,

 

 I tried the same in 4.2 version and even though there was no
 property document for the directory, the directory gets deleted succesfully
 but in 4.1 it throws a xdmp:doc-not -found. Am I right? is this the root
 cause or am I missing something? Please help me out 

  

 P.S: Sorry I'd given the version wrong in my previous mail, please ignore
 it

  

 Thanks in advance

 Raghu

  


  

 On Tue, Oct 25, 2011 at 6:34 PM, Raghu raghupathy.visweswa...@gmail.com
 wrote:

 HI Danny,

 

 I tried the same in 4.1 version and even though there was no
 property document for the directory, the directory gets deleted succesfully
 but in 4.0 it throws a xdmp:doc-not -found. Am I right? is this the root
 cause or am I missing something? Please help me out 

  

 Thanks in advance

 Raghu

  

 On Mon, Oct 24, 2011 at 10:25 PM, Danny Sokolsky 
 danny.sokol...@marklogic.com wrote:

 Hi Raghu,

  

 I can think of 2 things to look at:

  

  

 1)  Make sure the directory exists.  A directory is a properties
 document with the special directory element.  Try running the following,
 substituting the dir URI for $uri: 

  

 xdmp:document-properties($uri)

  

 this should return a properties document with a directory element.  If it
 does not, then the directory does not exist.

  

 2)  Make sure the user who is running the directory-delete has
 permissions to see the directory.   You can check that by looking at the
 permissions on the directory: 

  

 xdmp:document-get-permissions($uri)

  

 Also, what version of marklogic are you running (xdmp:version() )?

  

 -Danny

  

  

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Monday, October 24, 2011 6:20 AM
 *To:* General MarkLogic Developer Discussion
 *Subject:* [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

  

 Hi All,

  

I'm  trying to delete a directory usind xdmp:directory-delete; it
 returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same
 uri I'm able to see the documents inside the folder. These directories are
 created from a trigger. does it have anything to do with it? Should I set
 any document proerty? Please help me out.

  

  

  

 Thanks in advance

 Raghu

  

  

 ___
 General mailing list
 General@developer.marklogic.com
 http://developer.marklogic.com/mailman/listinfo/general

Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-11-15 Thread Raghu
BTW mine was a modify/update trigger that was one reason I didn't suspect
directory delete's behavior. But still it was on a directory and it starts
making sense now!! :)

On Tue, Nov 15, 2011 at 11:34 PM, Raghu raghupathy.visweswa...@gmail.comwrote:

 No I didn't mean that way. Sorry no offence meant. My point is I suspected
 everything but triggers!


 On Tue, Nov 15, 2011 at 11:16 PM, Danny Sokolsky 
 danny.sokol...@marklogic.com wrote:

 I am not sure that is weird behavior.  If you have a delete trigger that
 has a lot of work to do, for example, that would certainly impact the
 performance of deletes.  So it all depends on the totality of what is going
 on in your environment.

 ** **

 -Danny 

 ** **

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Tuesday, November 15, 2011 9:43 AM

 *To:* General MarkLogic Developer Discussion
 *Subject:* Re: [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

 ** **

 Hey Danny,

 Seems that I'd set triggers to triggers database and this
 was causing xdmp:directory-delete() not to work. Hope you had fixed this. I
 would have never suspected that triggers would have such an impact. weird
 behavior isn't it? 

 ** **

 Cheers

 Raghu

 On Tue, Oct 25, 2011 at 9:41 PM, Danny Sokolsky 
 danny.sokol...@marklogic.com wrote:

 Hi Raghu,

  

 That sounds right because in 4.2, there were a number of inconsistencies
 in the way MarkLogic handled directory and property deletes that were
 fixed.  This was to support standalone properties (a property with no
 corresponding document at the same URI).

  

 You can use a combination of the URI lexicon (cts:uri-match) and
 xdmp:document-delete to accomplish the same thing when you do not have the
 directories in your database.  Something like (this is untested):

  

 for $x in cts:uri-match(“/my/dir/*”)

 return

 xdmp:document-delete($x)

  

 -Danny

  

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Tuesday, October 25, 2011 6:36 AM


 *To:* General MarkLogic Developer Discussion

 *Subject:* Re: [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

  

  

 HI Danny,

 

 I tried the same in 4.2 version and even though there was no
 property document for the directory, the directory gets deleted succesfully
 but in 4.1 it throws a xdmp:doc-not -found. Am I right? is this the root
 cause or am I missing something? Please help me out 

  

 P.S: Sorry I'd given the version wrong in my previous mail, please ignore
 it

  

 Thanks in advance

 Raghu

  


  

 On Tue, Oct 25, 2011 at 6:34 PM, Raghu raghupathy.visweswa...@gmail.com
 wrote:

 HI Danny,

 

 I tried the same in 4.1 version and even though there was no
 property document for the directory, the directory gets deleted succesfully
 but in 4.0 it throws a xdmp:doc-not -found. Am I right? is this the root
 cause or am I missing something? Please help me out 

  

 Thanks in advance

 Raghu

  

 On Mon, Oct 24, 2011 at 10:25 PM, Danny Sokolsky 
 danny.sokol...@marklogic.com wrote:

 Hi Raghu,

  

 I can think of 2 things to look at:

  

  

 1)  Make sure the directory exists.  A directory is a properties
 document with the special directory element.  Try running the following,
 substituting the dir URI for $uri: 

  

 xdmp:document-properties($uri)

  

 this should return a properties document with a directory element.  If it
 does not, then the directory does not exist.

  

 2)  Make sure the user who is running the directory-delete has
 permissions to see the directory.   You can check that by looking at the
 permissions on the directory: 

  

 xdmp:document-get-permissions($uri)

  

 Also, what version of marklogic are you running (xdmp:version() )?

  

 -Danny

  

  

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Monday, October 24, 2011 6:20 AM
 *To:* General MarkLogic Developer Discussion
 *Subject:* [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

  

 Hi All,

  

I'm  trying to delete a directory usind xdmp:directory-delete; it
 returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same
 uri I'm able to see the documents inside the folder. These directories are
 created from a trigger. does it have anything to do with it? Should I set
 any document proerty? Please help me out.

  

  

  

 Thanks in advance

Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-10-25 Thread Raghu
Hi Lee,

  You are right! I have an a/b/c.xml and I assumed that it would
automatically be inside the folder a/b/ and when I try to delete the
directory it says doc-not-found and when I checked for the properties(as
Danny had said) it wasn't present. Thank you very much!



On Mon, Oct 24, 2011 at 10:36 PM, Lee, David d...@epocrates.com wrote:

  My guess is you have a document with a uri say like

 /a/b/c.xml

 ** **

 But there is no actual 'directory' object/a/b

 ** **

 This took me a long while to grok while starting with ML (but of course its
 so obvious now I don't think of it :)

 ** **

 MarkLogic doesn't require directory objects, and in many cases works much
 better without them.

 Check your settings on your database to see if Directories are
 automatically created. If not you probably just have a perfectly valid
 document which 'just by happenstance' and mistaken assumptions looks like it
 should be in a 'directory' ... 

 But unlike file systems,  ML doesn't need directories to create hieratical
 looking URI's.

 ** **

 ** **

 ** **

 

 David A. Lee

 Senior Principal Software Engineer

 Epocrates, Inc.

 d...@epocrates.com

 812-482-5224

 ** **

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Danny Sokolsky
 *Sent:* Monday, October 24, 2011 12:55 PM

 *To:* General MarkLogic Developer Discussion
 *Subject:* Re: [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

   ** **

 Hi Raghu,

 ** **

 I can think of 2 things to look at:

 ** **

 ** **

 **1)  **Make sure the directory exists.  A directory is a properties
 document with the special directory element.  Try running the following,
 substituting the dir URI for $uri: 

 ** **

 xdmp:document-properties($uri)

 ** **

 this should return a properties document with a directory element.  If it
 does not, then the directory does not exist.

 ** **

 **2)  **Make sure the user who is running the directory-delete has
 permissions to see the directory.   You can check that by looking at the
 permissions on the directory: 

 ** **

 xdmp:document-get-permissions($uri)

 ** **

 Also, what version of marklogic are you running (xdmp:version() )?

 ** **

 -Danny

 ** **

 ** **

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Monday, October 24, 2011 6:20 AM
 *To:* General MarkLogic Developer Discussion
 *Subject:* [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

 ** **

 Hi All,

  

I'm  trying to delete a directory usind xdmp:directory-delete; it
 returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same
 uri I'm able to see the documents inside the folder. These directories are
 created from a trigger. does it have anything to do with it? Should I set
 any document proerty? Please help me out.

  

  

  

 Thanks in advance

 Raghu

  

 ___
 General mailing list
 General@developer.marklogic.com
 http://developer.marklogic.com/mailman/listinfo/general


___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-10-25 Thread Raghu
HI Danny,

I tried the same in 4.1 version and even though there was no
property document for the directory, the directory gets deleted succesfully
but in 4.0 it throws a xdmp:doc-not -found. Am I right? is this the root
cause or am I missing something? Please help me out

Thanks in advance
Raghu

On Mon, Oct 24, 2011 at 10:25 PM, Danny Sokolsky 
danny.sokol...@marklogic.com wrote:

  Hi Raghu,

 ** **

 I can think of 2 things to look at:

 ** **

 ** **

 **1)  **Make sure the directory exists.  A directory is a properties
 document with the special directory element.  Try running the following,
 substituting the dir URI for $uri: 

 ** **

 xdmp:document-properties($uri)

 ** **

 this should return a properties document with a directory element.  If it
 does not, then the directory does not exist.

 ** **

 **2)  **Make sure the user who is running the directory-delete has
 permissions to see the directory.   You can check that by looking at the
 permissions on the directory: 

 ** **

 xdmp:document-get-permissions($uri)

 ** **

 Also, what version of marklogic are you running (xdmp:version() )?

 ** **

 -Danny

 ** **

 ** **

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Monday, October 24, 2011 6:20 AM
 *To:* General MarkLogic Developer Discussion
 *Subject:* [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

 ** **

 Hi All,

  

I'm  trying to delete a directory usind xdmp:directory-delete; it
 returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same
 uri I'm able to see the documents inside the folder. These directories are
 created from a trigger. does it have anything to do with it? Should I set
 any document proerty? Please help me out.

  

  

  

 Thanks in advance

 Raghu

  

 ___
 General mailing list
 General@developer.marklogic.com
 http://developer.marklogic.com/mailman/listinfo/general


___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-10-25 Thread Danny Sokolsky
Hi Raghu,

That sounds right because in 4.2, there were a number of inconsistencies in the 
way MarkLogic handled directory and property deletes that were fixed.  This was 
to support standalone properties (a property with no corresponding document at 
the same URI).

You can use a combination of the URI lexicon (cts:uri-match) and 
xdmp:document-delete to accomplish the same thing when you do not have the 
directories in your database.  Something like (this is untested):

for $x in cts:uri-match(/my/dir/*)
return
xdmp:document-delete($x)

-Danny

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Raghu
Sent: Tuesday, October 25, 2011 6:36 AM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found


HI Danny,

I tried the same in 4.2 version and even though there was no 
property document for the directory, the directory gets deleted succesfully but 
in 4.1 it throws a xdmp:doc-not -found. Am I right? is this the root cause or 
am I missing something? Please help me out

P.S: Sorry I'd given the version wrong in my previous mail, please ignore it

Thanks in advance
Raghu




On Tue, Oct 25, 2011 at 6:34 PM, Raghu 
raghupathy.visweswa...@gmail.commailto:raghupathy.visweswa...@gmail.com 
wrote:
HI Danny,

I tried the same in 4.1 version and even though there was no 
property document for the directory, the directory gets deleted succesfully but 
in 4.0 it throws a xdmp:doc-not -found. Am I right? is this the root cause or 
am I missing something? Please help me out

Thanks in advance
Raghu

On Mon, Oct 24, 2011 at 10:25 PM, Danny Sokolsky 
danny.sokol...@marklogic.commailto:danny.sokol...@marklogic.com wrote:
Hi Raghu,

I can think of 2 things to look at:



1)  Make sure the directory exists.  A directory is a properties document 
with the special directory element.  Try running the following, substituting 
the dir URI for $uri:

xdmp:document-properties($uri)

this should return a properties document with a directory element.  If it does 
not, then the directory does not exist.


2)  Make sure the user who is running the directory-delete has permissions 
to see the directory.   You can check that by looking at the permissions on the 
directory:

xdmp:document-get-permissions($uri)

Also, what version of marklogic are you running (xdmp:version() )?

-Danny


From: 
general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com
 
[mailto:general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com]
 On Behalf Of Raghu
Sent: Monday, October 24, 2011 6:20 AM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found

Hi All,

   I'm  trying to delete a directory usind xdmp:directory-delete; it 
returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same uri 
I'm able to see the documents inside the folder. These directories are created 
from a trigger. does it have anything to do with it? Should I set any document 
proerty? Please help me out.



Thanks in advance
Raghu


___
General mailing list
General@developer.marklogic.commailto:General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-10-25 Thread Raghu
Thanks Dan!

On Tue, Oct 25, 2011 at 9:41 PM, Danny Sokolsky 
danny.sokol...@marklogic.com wrote:

 Hi Raghu,

 ** **

 That sounds right because in 4.2, there were a number of inconsistencies in
 the way MarkLogic handled directory and property deletes that were fixed.
 This was to support standalone properties (a property with no corresponding
 document at the same URI).

 ** **

 You can use a combination of the URI lexicon (cts:uri-match) and
 xdmp:document-delete to accomplish the same thing when you do not have the
 directories in your database.  Something like (this is untested):

 ** **

 for $x in cts:uri-match(“/my/dir/*”)

 return

 xdmp:document-delete($x)

 ** **

 -Danny

 ** **

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Tuesday, October 25, 2011 6:36 AM

 *To:* General MarkLogic Developer Discussion
 *Subject:* Re: [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

 ** **

 ** **

 HI Danny,

 

 I tried the same in 4.2 version and even though there was no
 property document for the directory, the directory gets deleted succesfully
 but in 4.1 it throws a xdmp:doc-not -found. Am I right? is this the root
 cause or am I missing something? Please help me out 

  

 P.S: Sorry I'd given the version wrong in my previous mail, please ignore
 it

  

 Thanks in advance

 Raghu

  


  

 On Tue, Oct 25, 2011 at 6:34 PM, Raghu raghupathy.visweswa...@gmail.com
 wrote:

 HI Danny,

 

 I tried the same in 4.1 version and even though there was no
 property document for the directory, the directory gets deleted succesfully
 but in 4.0 it throws a xdmp:doc-not -found. Am I right? is this the root
 cause or am I missing something? Please help me out 

  

 Thanks in advance

 Raghu

  

 On Mon, Oct 24, 2011 at 10:25 PM, Danny Sokolsky 
 danny.sokol...@marklogic.com wrote:

 Hi Raghu,

  

 I can think of 2 things to look at:

  

  

 1)  Make sure the directory exists.  A directory is a properties
 document with the special directory element.  Try running the following,
 substituting the dir URI for $uri: 

  

 xdmp:document-properties($uri)

  

 this should return a properties document with a directory element.  If it
 does not, then the directory does not exist.

  

 2)  Make sure the user who is running the directory-delete has
 permissions to see the directory.   You can check that by looking at the
 permissions on the directory: 

  

 xdmp:document-get-permissions($uri)

  

 Also, what version of marklogic are you running (xdmp:version() )?

  

 -Danny

  

  

 *From:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Raghu
 *Sent:* Monday, October 24, 2011 6:20 AM
 *To:* General MarkLogic Developer Discussion
 *Subject:* [MarkLogic Dev General] Directory exists but
 xdmp:directory-delete return xdmp:doc-not-found

  

 Hi All,

  

I'm  trying to delete a directory usind xdmp:directory-delete; it
 returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same
 uri I'm able to see the documents inside the folder. These directories are
 created from a trigger. does it have anything to do with it? Should I set
 any document proerty? Please help me out.

  

  

  

 Thanks in advance

 Raghu

  

 ** **

 ___
 General mailing list
 General@developer.marklogic.com
 http://developer.marklogic.com/mailman/listinfo/general

 ** **

 ** **

 ___
 General mailing list
 General@developer.marklogic.com
 http://developer.marklogic.com/mailman/listinfo/general


___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-10-24 Thread Danny Sokolsky
Hi Raghu,

I can think of 2 things to look at:



1)  Make sure the directory exists.  A directory is a properties document 
with the special directory element.  Try running the following, substituting 
the dir URI for $uri:

xdmp:document-properties($uri)

this should return a properties document with a directory element.  If it does 
not, then the directory does not exist.


2)  Make sure the user who is running the directory-delete has permissions 
to see the directory.   You can check that by looking at the permissions on the 
directory:

xdmp:document-get-permissions($uri)

Also, what version of marklogic are you running (xdmp:version() )?

-Danny


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Raghu
Sent: Monday, October 24, 2011 6:20 AM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found

Hi All,

   I'm  trying to delete a directory usind xdmp:directory-delete; it 
returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same uri 
I'm able to see the documents inside the folder. These directories are created 
from a trigger. does it have anything to do with it? Should I set any document 
proerty? Please help me out.



Thanks in advance
Raghu

___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-10-24 Thread Tim Meagher
Danny,

 

If the directory does not have the necessary permission, how do you add it?

 

Thx - Tim Meagher

 

From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky
Sent: Monday, October 24, 2011 12:55 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Directory exists but
xdmp:directory-delete return xdmp:doc-not-found

 

Hi Raghu,

 

I can think of 2 things to look at:

 

 

1)  Make sure the directory exists.  A directory is a properties
document with the special directory element.  Try running the following,
substituting the dir URI for $uri: 

 

xdmp:document-properties($uri)

 

this should return a properties document with a directory element.  If it
does not, then the directory does not exist.

 

2)  Make sure the user who is running the directory-delete has
permissions to see the directory.   You can check that by looking at the
permissions on the directory: 

 

xdmp:document-get-permissions($uri)

 

Also, what version of marklogic are you running (xdmp:version() )?

 

-Danny

 

 

From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Raghu
Sent: Monday, October 24, 2011 6:20 AM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Directory exists but xdmp:directory-delete
return xdmp:doc-not-found

 

Hi All,

 

   I'm  trying to delete a directory usind xdmp:directory-delete; it
returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same
uri I'm able to see the documents inside the folder. These directories are
created from a trigger. does it have anything to do with it? Should I set
any document proerty? Please help me out.

 

 

 

Thanks in advance

Raghu

 

___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete return xdmp:doc-not-found

2011-10-24 Thread Danny Sokolsky
You can use either xdmp:document-add-permissions or 
xdmp:document-set-permissions.  The former adds to the existing permission set 
for the URI, and the latter replaces the permissions with the ones you set it 
with.

-Danny

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Tim Meagher
Sent: Monday, October 24, 2011 10:01 AM
To: 'General MarkLogic Developer Discussion'
Subject: Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found

Danny,

If the directory does not have the necessary permission, how do you add it?

Thx - Tim Meagher

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Danny Sokolsky
Sent: Monday, October 24, 2011 12:55 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found

Hi Raghu,

I can think of 2 things to look at:



1)  Make sure the directory exists.  A directory is a properties document 
with the special directory element.  Try running the following, substituting 
the dir URI for $uri:

xdmp:document-properties($uri)

this should return a properties document with a directory element.  If it does 
not, then the directory does not exist.


2)  Make sure the user who is running the directory-delete has permissions 
to see the directory.   You can check that by looking at the permissions on the 
directory:

xdmp:document-get-permissions($uri)

Also, what version of marklogic are you running (xdmp:version() )?

-Danny


From: 
general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com
 
[mailto:general-boun...@developer.marklogic.com]mailto:[mailto:general-boun...@developer.marklogic.com]
 On Behalf Of Raghu
Sent: Monday, October 24, 2011 6:20 AM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Directory exists but xdmp:directory-delete 
return xdmp:doc-not-found

Hi All,

   I'm  trying to delete a directory usind xdmp:directory-delete; it 
returns a   xdmp:doc-not-found but when I do a xdmp:directory of the same uri 
I'm able to see the documents inside the folder. These directories are created 
from a trigger. does it have anything to do with it? Should I set any document 
proerty? Please help me out.



Thanks in advance
Raghu

___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general