Hi, We are using a custom SortField <https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.8/plugin/src/main/java/com/stratio/cassandra/lucene/key/KeySort.java> to sort Cassandra primary keys. The sort criteria is based on the marshalled values of each of the columns in the primary key, so it is not trivial at all to compute an equivalent collated value to be indexed in doc values.
Maybe it could be possible to define how to do this serialization-deserialization when extending SortField. This way it will be possible to recover this lost Lucene 5.x feature, don't you think so? Thanks, 2016-08-14 23:09 GMT+01:00 Michael McCandless <luc...@mikemccandless.com>: > Unfortunately, as of LUCENE-6766, index sorting only supports simple sort > types. This was needed because Lucene needs to be able to easily serialize > and de-serialize the sort order into the index. > > Can you compute your sort criteria and index it as a doc values field and > then sort by that? > > Or, patches welcome too ;) > > Mike McCandless > > http://blog.mikemccandless.com > > On Sun, Aug 14, 2016 at 7:19 AM, Andres de la Peña <adelap...@stratio.com> > wrote: > >> Hi, >> >> LUCENE-6766 allows to define index sorting on IndexWriterConfig instead of >> defining a SortingMergePolicy. However, the new index sorting only >> supports >> some types of sort fields, and the old SortingMergePolicy, which didn't >> have this limitation, has been removed. >> >> What should do projects depending on index sort with custom SortFields? >> Ignore the new index writer sorting and build their own old-style sorting >> merge policy? >> >> Thanks, >> >> -- >> Andrés de la Peña >> >> Vía de las dos Castillas, 33, Ática 4, 3ª Planta >> 28224 Pozuelo de Alarcón, Madrid >> Tel: +34 91 828 6473 // www.stratio.com // *@stratiobd >> <https://twitter.com/StratioBD>* >> > > -- Andrés de la Peña Vía de las dos Castillas, 33, Ática 4, 3ª Planta 28224 Pozuelo de Alarcón, Madrid Tel: +34 91 828 6473 // www.stratio.com // *@stratiobd <https://twitter.com/StratioBD>*