title: Overriding get_queryset, but get empty result set
body: <p>So I have a database of books, and I want to search it based on filters and keywords so I've overridden the get_queryset method in my BookSearch view:</p>
  <pre><code>  class BookSearch(generics.ListAPIView):
      serializer_class = ProductDetailViewSerializer
      model = ProductDetailView 
  
      def get_queryset(self):
        queryset = None
        categories = self.kwargs['categories'].rstrip()    
        keywords = self.kwargs['keywords'].rstrip()
        if isinstance(categories, str) and isinstance(keywords, str):
          book_filter = BookFilter(categories)
          sql = self.get_sql(categories, keywords, book_filter)
          queryset = ProductDetailView.objects.filter(
                        id__in=RawSQL(sql, book_filter.params)
                     )
          message = f&quot;{queryset.query}&quot;
          log_to_file('BookSearch.log', 'BookSearch.get_queryset', message)
          return queryset
  </code></pre>
  <p>That log_to_file call logs the query that django uses, which I've abbreviated here
  but is as follows:</p>
  <pre><code>   SELECT `jester_productdetailview`.`id`, 
               `jester_productdetailview`.`isbn`, 
               `jester_productdetailview`.`title`  
       FROM `jester_productdetailview` 
      WHERE `jester_productdetailview`.`id` IN (
        select id from jester_productdetailview   
         where ( authors like '%Beatrix%' or 
                 illustrators like '%Beatrix%' or 
                 title like '%Beatrix%' ) ) 
      ORDER BY `jester_productdetailview`.`title` ASC
  </code></pre>
  <p>If I run that query in my database manually, I get 186 rows:</p>
  <pre><code>   '119371','9780723259572','A Beatrix Potter Treasury'
     '130754','9780241293348','A Christmas Wish'
     '117336','9780241358740','A Pumpkin for Peter' ...
  </code></pre>
  <p>To get the query above, I call the view through the API, yet by the time the queryset is returned, there are no results ???</p>
  <p><a href="http://127.0.0.1:8000/api/book-search/%7B%22filter%22" rel="nofollow noreferrer">http://127.0.0.1:8000/api/book-search/{&quot;filter&quot;</a>: &quot;all&quot;}/Beatrix/
  returns []</p>