Hi Mihir, If you are using directory scope, your URIs need to be rooted (for example, with a "/" character). Since "my-uri-something1.xml" is not rooted, you cannot access it with a directory domain. As Mary indicated, you could put it in a collection and access it that way.
If you want to do something like this with directories, you can make the directories of this form: /my/uri/something1.xml /my/uri/something2.xml /my/uri/something3.xml .... Then make the domain scope be /my/uri/. That should work, I think. -Danny From: [email protected] [mailto:[email protected]] On Behalf Of Mihir Das Sent: Thursday, March 13, 2014 5:54 AM To: [email protected] Subject: Re: [MarkLogic Dev General] Domain scope as document pattern Thanks Mary for response! "my-uri-something.xml should be in the domain?" correct, my documents are organised like "my-uri-something1.xml, my-uri-something2.xml' You already answered, Domain can not be created on regex. Just wondering if we can create domain on regex then it would be another level of flexibility. Thanks, Mihir Message: 2 Date: Wed, 12 Mar 2014 19:09:58 +0800 From: Mihir Das <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] Domain scope as document pattern To: [email protected]<mailto:[email protected]> Message-ID: <CAH=H5V+RK5eF6jRYRxUAh4Fy8OVkxr40fqWv0gK9wjLQwS4C=w...@mail.gmail.com<mailto:[email protected]>> Content-Type: text/plain; charset="iso-8859-1" Guys, I have to define a CPF domain with document scope matching to uri pattern. e.g. all document starting with "my-uri" should be included in domain. *can not use directory/collection Any help is appreciated! Thanks Mihir -------------- next part -------------- An HTML attachment was scrubbed... URL: http://developer.marklogic.com/pipermail/general/attachments/20140312/0ca4751d/attachment-0001.html ------------------------------ Message: 3 Date: Wed, 12 Mar 2014 08:03:03 -0700 From: "Mary Holstege" <[email protected]<mailto:[email protected]>> Subject: Re: [MarkLogic Dev General] Domain scope as document pattern To: "MarkLogic Developer Discussion" <[email protected]<mailto:[email protected]>> Message-ID: <[email protected]<mailto:[email protected]>> Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes On Wed, 12 Mar 2014 04:09:58 -0700, Mihir Das <[email protected]<mailto:[email protected]>> wrote: > Guys, > > I have to define a CPF domain with document scope matching to uri > pattern. > e.g. all document starting with "my-uri" should be included in domain. > > *can not use directory/collection > > Any help is appreciated! > > Thanks > Mihir So just to be clear, you can't use directory because my-uri-something.xml should be in the domain? If instead you mean that all documens with uris like my-uri/something.xml should be in the domain, then that is in fact a directory scope on my-uri. You cannot create domains on uri regexes and the like. My recommendation is to use collections. You should be able to add a collection to the documents you are interested in when you ingest them. Documents can be in multiple collections, so having a special collection for this purpose should not in any way interfere with your application. //Mary ------------------------------ _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general End of General Digest, Vol 117, Issue 22 ****************************************
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
