Sort a Lucene index by a StoredField or a function of docID
Summary The problem involves sorting a Lucene index by a StoredField called “fileId” or a function of docID. The initial approach used a SortField with the “fileId” field, but this resulted in an IllegalStateException due to the field not being a DocValue field. A custom DocSortField class was created to sort by a function of … Read more