Commit ad22b372 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT][FIX] Export hash, sort needed.

parent bf19abb3
...@@ -121,7 +121,7 @@ getCorpus cId lId nt' = do ...@@ -121,7 +121,7 @@ getCorpus cId lId nt' = do
r = Map.intersectionWith (\a b -> Document a (Ngrams (Set.toList b) (ng_hash b)) (d_hash a b) r = Map.intersectionWith (\a b -> Document a (Ngrams (Set.toList b) (ng_hash b)) (d_hash a b)
) ns ngs ) ns ngs
where where
ng_hash b = sha $ Set.foldl (\x y -> x<>y) "" b ng_hash b = sha $ List.foldl (\x y -> x<>y) "" $ List.sort $ Set.toList b
d_hash a b = sha $ (fromMaybe "" (_hyperdataDocument_uniqId $ _node_hyperdata a)) d_hash a b = sha $ (fromMaybe "" (_hyperdataDocument_uniqId $ _node_hyperdata a))
<> (ng_hash b) <> (ng_hash b)
......
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