12 apr 2007 kl. 17.06 skrev Yonik Seeley:
Sorting works on indexed tokens, and hence doesn't really work on analyzed fields that produce more than one token per document. I suspect your title field falls into that category. You could also index the title field into another field that is indexed as a string (non-tokenized), but that might take up a lot of memory if you have long titles.
It just hit me (and I did not consider it any further) that perhaps one could store String.valueOf(theTitle.hashcode()) in an alternative field and sort by that instead? It will not be 100% accurate, but in most cases it will. However, I'm not sure how negative values will be handled. If that would be a problem, one could convert the integer to alfanum. That should also save a bunch of memory.
-- karl