Skip to content

Commit

Permalink
Merge pull request #794 from Natay/master
Browse files Browse the repository at this point in the history
similar posts set to be unique
  • Loading branch information
ialbert committed Apr 5, 2021
2 parents db9b4b2 + ee0cc3a commit 46a0a29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions biostar/forum/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ def more_like_this(uid, top=0, sortedby=[]):
results = results[0].more_like_this("content", top=top)
# Copy hits to list and close searcher object.
final = list(map(copy_hits, results))
# Show unique posts
final = {h['uid']: h for h in final}
final = list(final.values())
else:
final = []

Expand Down

0 comments on commit 46a0a29

Please sign in to comment.