[MarkLogic Dev General] March 8, 2012 MUGL meeting

2012-03-07 Thread Ron Hitchens
The March 8 meeting of the MarkLogic User Group London (MUGL) is scheduled for tomorrow night. If you live in or near London, or will be in town, drop by and see us. We have a larger venue than in the past so we still have several slots open. Visit our MeetUp page [1] to signup. This

[MarkLogic Dev General] XCC AdHocQuery versus CQ Queries

2012-03-07 Thread Tom Hubschman
Hi All, Is there any difference between executing an query in CQ and in a XCC java (version 4.2)? My geoquery works in CQ but not XCC. Specifically using this XCC method: http://developer.marklogic.com/pubs/4.2/javadoc/com/marklogic/xcc/Session.html#newAdhocQuery(java.lang.String) Thanks

[MarkLogic Dev General] A to Z buckets with search:search?

2012-03-07 Thread Jakob Fix
Hi, I'd like to (ab)use the search API to provide buckets for each letter in the alphabet and in each bucket I'd like to have all those documents whose titles start with that letter (let's assume non-significant words such as the and a at the title's start have been removed). What options would

[MarkLogic Dev General] xdmp:collection-delete()

2012-03-07 Thread Palani TT
Hi, I am trying to understand the behavior of this function. My requirement was to delete the records in a particular collection. I had like 2000 records under a particular userid/folder. I moved 50 records from that userid to a collection named Test using xdmp:document-set-collections()

Re: [MarkLogic Dev General] xdmp:collection-delete()

2012-03-07 Thread Geert Josten
Hi Palani, Sure only 50 docs had been added to that collection? You can test that easily using count(collection(“Test”)), or for a bit more speed xdmp:estimate(collection(“Test”)) Kind regards, Geert *Van:* general-boun...@developer.marklogic.com [mailto:general-bounces@deve

Re: [MarkLogic Dev General] A to Z buckets with search:search?

2012-03-07 Thread Geert Josten
Hi Jakob, Not entirely sure, but I'd expect it to be quite similar to date buckets: constraint name=title range type=xs:string element ns= name=title/ bucket name=A ge=A lt=BA/bucket (untested) Kind regards, Geert

Re: [MarkLogic Dev General] xdmp:collection-delete()

2012-03-07 Thread Palani TT
Hi Geert, Yes, I did verify the count of the the collection Test using count(fn:collection(Test)) and it was 50. Below is the code that I was using to move the doc uris to Test collection, let $result := for $i in cts:uri-match(/localhost/userid/*)[1 to 51] let

Re: [MarkLogic Dev General] A to Z buckets with search:search?

2012-03-07 Thread Jakob Fix
Thanks Geert, for your reply. Your code example seems to imply that the title element would have to contain exactly one letter which would be used to fill the different buckets. This and more in-depth reading of the documentation for the search:range element suggests that the most efficient way

Re: [MarkLogic Dev General] A to Z buckets with search:search?

2012-03-07 Thread Danny Sokolsky
Hi Jakob, You can compare strings to be less than or greater than or equal just like you can numbers. When strings are compared, they are compared based on their collation. For example the following: xquery version 1.0-ml; declare default collation http://marklogic.com/collation/;; abc a,

Re: [MarkLogic Dev General] A to Z buckets with search:search?

2012-03-07 Thread Jakob Fix
cool, thanks Danny, that seems solved then :) cheers, Jakob. On Wed, Mar 7, 2012 at 23:43, Danny Sokolsky danny.sokol...@marklogic.com wrote: Hi Jakob, You can compare strings to be less than or greater than or equal just like you can numbers.  When strings are compared, they are compared

Re: [MarkLogic Dev General] xdmp:collection-delete()

2012-03-07 Thread Geert Josten
Hi Palani, Ah, yes. URI lexicon can return directories too. Funny that xdmp:document-set-collections allows adding directories to collections.. Kind regards, Geert *Van:* general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] *Namens *Palani TT

Re: [MarkLogic Dev General] xdmp:collection-delete()

2012-03-07 Thread Ron Hitchens
Next time try this: cts:uri-match(/localhost/userid/*, document) On Mar 8, 2012, at 6:39 AM, Geert Josten wrote: Hi Palani, Ah, yes. URI lexicon can return directories too. Funny that xdmp:document-set-collections allows adding directories to collections.. Kind regards, Geert