import Data.Maybe
import Data.Text (Text)
-import Data.Tuple (snd)
import Gargantext.Core.Types (Offset, Limit)
import Gargantext.Database.Query.Facet
import Gargantext.Database.Admin.Types.Hyperdata
getPriors ft cId = do
docs_fav <- filter (\(FacetDoc _ _ _ _ f _) -> f == Just 2)
- <$> runViewDocuments cId False Nothing Nothing Nothing
+ <$> runViewDocuments cId False Nothing Nothing Nothing Nothing
docs_trash <- List.take (List.length docs_fav)
- <$> runViewDocuments cId True Nothing Nothing Nothing
+ <$> runViewDocuments cId True Nothing Nothing Nothing Nothing
let priors = priorEventsWith text (fav2bool ft) ( List.zip (repeat False) docs_fav
moreLikeWith cId o l order ft priors = do
docs_test <- filter (\(FacetDoc _ _ _ _ f _) -> f == Just 1)
- <$> runViewDocuments cId False o Nothing order
+ <$> runViewDocuments cId False o Nothing order Nothing
let results = map fst
$ filter ((==) (Just $ not $ fav2bool ft) . snd)