Hello-
One of the fields in my index is an ID, which maps to a full text
description behind the scenes. Now I want to sort the search results
alphabetically according to the description, not the ID. This can be
done via SortComparatorSource and a ScoreDocComparator without
problems. But the code needed to do this is quite complicated - it
involves retrieving the document ID from the ScoreDoc, then looking
up the Document through an IndexReader, and then retrieving the ID
field from the document. It seems that there should be an easier way
to get at the ID field, since that is the one being used for the
sort. There is a related class FieldDoc, through which it seems
possible to get at the field values, but that doesn't seem applicable
here.
I went through the custom sorting example of "Lucene In Action", but
that doesn't deal with this case. Am I missing something obvious?
Thanks in advance,
Ulf
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]