You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Eduardo Alonso <ed...@stratio.com> on 2017/01/03 17:26:56 UTC

[feature proposal] Segment sorted by CUSTOM SortField

Hi to all:

I am Eduardo Alonso and i am new to Lucene.

If you use *indexWriterConfig.setIndexSort(Sort sort)* lucene saves
Segments sorted by Sort, but does not allows sorting by Custom SortFields
(user defined class extending o.a.l.s.SortField).

Do you think is this functionality (sort by custom SortField) useful?

I would like to contribute to Lucene deploying this functionality.

Should I open a Jira ticket?

Regards



Eduardo Alonso
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>*

Re: [feature proposal] Segment sorted by CUSTOM SortField

Posted by Adrien Grand <jp...@gmail.com>.
Hi Eduardo,

I agree with the usefulness, but implementing it will raise issues with
backward compatibility since those custom sort fields would need to be
serialized in the index files, which I think will be controversial. I think
it would still be useful to open an issue to get the problem discussed, but
I wanted to warn you that this is not an easy issue to get started with. I
suspect we will look at use-cases one-by-one, like we did for multi-valued
fields (https://issues.apache.org/jira/browse/LUCENE-7537) rather than try
to solve the problem in the general case. If there is some specific type of
sort that you are interested in, that might be something easier to get in.

If you want something easier to get started with, something that comes to
my mind is this old comment about adding a token filter that protects
tokens based on their length. I don't think it has been implemented:
https://issues.apache.org/jira/browse/LUCENE-5208?focusedCommentId=13766576&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13766576
.



Le mar. 3 janv. 2017 à 18:27, Eduardo Alonso <ed...@stratio.com> a
écrit :

> Hi to all:
>
> I am Eduardo Alonso and i am new to Lucene.
>
> If you use *indexWriterConfig.setIndexSort(Sort sort)* lucene saves
> Segments sorted by Sort, but does not allows sorting by Custom SortFields
> (user defined class extending o.a.l.s.SortField).
>
> Do you think is this functionality (sort by custom SortField) useful?
>
> I would like to contribute to Lucene deploying this functionality.
>
> Should I open a Jira ticket?
>
> Regards
>
>
>
> Eduardo Alonso
> Vía de las dos Castillas, 33, Ática 4, 3ª Planta
> 28224 Pozuelo de Alarcón, Madrid
> Tel: +34 91 828 6473 <+34%20918%2028%2064%2073> // www.stratio.com // *@stratiobd
> <https://twitter.com/StratioBD>*
>