Commit 78a2d87c authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[ngrams] add offline ordering by term

parent 72c5cdfa
......@@ -391,6 +391,8 @@ loadedNgramsTableSpec = Thermite.simpleSpec performAction render
case convOrderBy <$> params.orderBy of
Just ScoreAsc -> A.sortWith \x -> (snd x) ^. _NgramsElement <<< _occurrences
Just ScoreDesc -> A.sortWith \x -> Down $ (snd x) ^. _NgramsElement <<< _occurrences
Just TermAsc -> A.sortWith \x -> (snd x) ^. _NgramsElement <<< _ngrams
Just TermDesc -> A.sortWith \x -> Down $ (snd x) ^. _NgramsElement <<< _ngrams
_ -> identity -- the server ordering is enough here
rows :: T.Rows
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment