SearchQuery and duplicate in queryset

Last time I asked how to filter without getting duplicates and I was advised to use distinct() and it helped, but now I wanted to add sorting by relevance using SearchRank and after that duplicates appeared in the queryset again, and distinct( ) dosent help.
my models:

class Book(models.Model):
    ...
    genres = models.ManyToManyField(
        Genre, related_name='book', blank=True)
    ...
class Genre(models.Model):
    name = models.CharField(max_length=100, null=True, blank=True)

my query string

?genre=Supernatural&genre=Romance

and view

class BookList(ListView):
    template_name='book/list.html'
    context_object_name = 'list'
    def get_queryset(self):
            book=Book
            genres = self.request.GET.getlist('genre')
            search_vector = SearchVector('genres__name')
            if genres:
                search_query = SearchQuery(genres.pop())
                for genre in genres:
                    search_query |= SearchQuery(genre)  
                book=book.objects.all().values('id','title__original_name','image').\
                                   annotate(rank=SearchRank(search_vector,search_query)).\
                                   filter(genres__name__in=genres).order_by('rank').distinct()
            else:
                book=book.objects.all().values('id','title__original_name','image')
            return book

As i understand, i get duplicate for each match in SeqrchQuery and if my book, for example, match 4 times with SeqrchQuery, then i get 4 instance of it in my queryset.

The distinct clause has some caveats in it about how it compares rows. They advise that it may be necessary to specify on which fields you want to ensure the result set being distinct. You may need to do something like .distinct('rank', 'id') to get the results you want.

You may also need to turn your query into a subquery with the distinct and allow the outer query to perform the sort by rank.

as far as im aware though, DISTINCT ON still does not work on MySQL. :’[

I also believe that to be true. (Which is why I mentioned the subquery as an alternative to the distinct.)

Well, i kinda solved my problem with this code

book=book.objects.all().values('id','title__original_name','image').filter(genres__name__in=genres).annotate(relevance=Count('id')).order_by('-relevance','title__original_name')