Sort field values by client-specified order

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Sort field values by client-specified order


we have a fixed number of values in a String field (up to around 100),
that should be used for sorting query results. Is there some way to let
the client specify the sort order as part of its query?

I was thinking about using a function query. Is it possible to specify
the order of values as part of the request? If so, do you have an idea
for how many values that would work? 10, 100, 1000?

The use case behind this is that different clients have different
localizations and expect results sorted according to their localization.
If the above isn't possible, I would probably add fields with the
localized values (one for each locale), but that would be a bit complex
in our setup and require re-indexing when localizations change or new
locales are added.

Thanks for any hints.

Kind regards,