title: The best way to use full-text search in django-filters' FilterSet?
body: <p>My app uses <code>rest-framework</code> and <code>django-filter</code>. I use this <code>FilterSet</code> to provide filtering list of articles (<code>ModelViewSet</code>) by <code>date</code>:</p>
  
  <pre><code>from django_filters import rest_framework as filters
  
  class ArticleFilter(filters.FilterSet):
      start_date = filters.DateTimeFilter(field_name='pub_date', lookup_expr='gte')
      end_date = filters.DateTimeFilter(field_name='pub_date', lookup_expr='lte') 
  
      class Meta:
          model = Article
          fields = ['pub_date']
  </code></pre>
  
  <p>I want to add search box to my app, so I need another filter, that will use full-text search at my <code>Article</code> model. Fields I would to search are <code>title</code> and <code>description</code>. I decided to add <code>search</code> field with <code>method</code> parameter like that:</p>
  
  <pre><code>from django_filters import rest_framework as filters
  from django.contrib.postgres.search import SearchVector
  
  class ArticleFilter(filters.FilterSet):
      start_date = filters.DateTimeFilter(field_name='pub_date', lookup_expr='gte')
      end_date = filters.DateTimeFilter(field_name='pub_date', lookup_expr='lte')
      search = filters.CharFilter(method='filter_search')
  
      def filter_search(self, queryset, name, value):
          return queryset.annotate(search=SearchVector('title', 'description')).filter(search=value)
  
      class Meta:
          model = Article
          fields = ['pub_date']
  </code></pre>
  
  <p>It works, but I'm not sure that it's the best way of using full-text search filtering. Am I missing something or this approach is ok?</p>