Commit 1d92bf86 authored by Michal Čihař's avatar Michal Čihař

Configurable amount of top results

parent 31d3a546
...@@ -351,7 +351,7 @@ class UnitManager(models.Manager): ...@@ -351,7 +351,7 @@ class UnitManager(models.Manager):
pk=unit.id pk=unit.id
) )
def more_like_this(self, unit): def more_like_this(self, unit, top=5):
''' '''
Finds closely similar units. Finds closely similar units.
''' '''
...@@ -372,7 +372,7 @@ class UnitManager(models.Manager): ...@@ -372,7 +372,7 @@ class UnitManager(models.Manager):
more_results = first_hit.more_like_this( more_results = first_hit.more_like_this(
'source', 'source',
source_string, source_string,
8 top
) )
# Include all more like this results # Include all more like this results
for result in more_results: for result in more_results:
......
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