Hi, I'm trying to create a list of titles, sorted alphabetically, but want to sort ignoring initial stop words. I've set up an index for title_or_id, which works fine, but "The Resource" ends up listed under T. I've tried using a Lexicon, but these seem to only be able to be used for Text Fields, which can't be used in a sort. Is there another way to do this? Cheers Michael Davis
Davis Mr MR wrote:
Hi,
I'm trying to create a list of titles, sorted alphabetically, but want to sort ignoring initial stop words.
I've set up an index for title_or_id, which works fine, but "The Resource" ends up listed under T. I've tried using a Lexicon, but these seem to only be able to be used for Text Fields, which can't be used in a sort.
Is there another way to do this?
Two options: 1. write your own index which does what you want. 2. write a python script (say, sortTitle) which returns the Title processed as you want (ie, without stop words) and then index that in a FieldIndex. In either case, you may be able to use bits of either TextIndex or ZCTextIndex that already have a good list of stop words and the machinery to remove them. IIRC, ZCTextIndex is the more modular of the two... cheers, Chris
participants (2)
-
Chris Withers -
Davis Mr MR