couldn't you do this all with a simple slice operator?

```
results = enumerate(Query.objects.filter(querytext__startswith=value
                                                       ).filter(frequency__gte=settings.QUERY_SUGGESTION_THRESHOLD
                                                                ).order_by('-frequency').values_list('querytext', flat=True)[0:5])

```
Watch out because this will give you (i,value) pairs and not (value,i)