Wednesday 15 April 2015

sql order by - Elasticsearch (round-robin sorting) -


Consider the follow-up list of products, at the moment, they are sorted by name, it gives an inappropriate result which is the following output (1 giving company top of the result based on its 'lucky' product name)

company x product 1
company x product 2
company x product 3
company y product one
company z product a
company y product b
company z product b
company y product c
company z TPAR C =

How do I sort this sort using elastic search so that it comes in the "round robin" order, i.e. repeat the first one, once each unique item is selected, then the list above This way will come out:

company x product 1
company y product a company company product a company x product 2
company y product b
company Z product b
company x product 3
company y product c
company z product c

I asked this question about LINQ Asked for:

Unless you find a sort of script solution, your best bet There are many elastic searches to complete and merge the results manually. You can use all searches in at least one request.

No comments:

Post a Comment