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
