cool, thanks Danny, that seems solved then :)

cheers,
Jakob.



On Wed, Mar 7, 2012 at 23:43, Danny Sokolsky
<[email protected]> 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 based on their 
> collation.  For example the following:
>
> xquery version "1.0-ml";
> declare default collation "http://marklogic.com/collation/";;
>
> "abc" > "a",
> "abc" > "b"
>
> =>
> true
> false
>
> So those buckets do not require only a single letter string.  You can also 
> specify lots of different collation such as case-insensitive, 
> diacritic-insensitive, etc, etc.
>
> -Danny
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Jakob Fix
> Sent: Wednesday, March 07, 2012 2:32 PM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] A to Z buckets with search:search?
>
> 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 would be to
> add a "start-letter" attribute (or element) for each document that
> could be used.
>
> Another idea could possibly be the search:custom element but
> documentation is a bit sparse.
>
> cheers,
> Jakob.
>
>
>
> On Wed, Mar 7, 2012 at 21:22, Geert Josten <[email protected]> wrote:
>> 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="B">A</bucket>
>>
>> (untested)
>>
>> Kind regards,
>> Geert
>>
>>> -----Oorspronkelijk bericht-----
>>> Van: [email protected] [mailto:general-
>>> [email protected]] Namens Jakob Fix
>>> Verzonden: woensdag 7 maart 2012 17:21
>>> Aan: General Mark Logic Developer Discussion
>>> Onderwerp: [MarkLogic Dev General] A to Z buckets with search:search?
>>>
>>> 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 I have to use to achieve that using
>>> search:search?
>>>
>>> thanks in advance,
>>> Jakob.
>>> _______________________________________________
>>> General mailing list
>>> [email protected]
>>> http://developer.marklogic.com/mailman/listinfo/general
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to