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


and view

class BookList(ListView):
    context_object_name = 'list'
    def get_queryset(self):
            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)  
            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