title: Django Rest Framework: How do I order/sort a search/filter query?
body: <p>I'm building out an API with Django Rest Framework, and I'd like to have a feature that allows users to search by a query. Currently,
  <code>http://127.0.0.1:8000/api/v1/species/?name=human</code> yields:</p>
  
  <pre><code>{
      count: 3,
      next: null,
      previous: null,
      results: [
          {
              id: 1,
              name: "Humanoid",
              characters: [
                  {
                      id: 46,
                      name: "Doctor Princess"
                  }
              ]
          },
          {
              id: 3,
              name: "Inhuman (overtime)",
              characters: [
  
              ]
          },
          {
              id: 4,
              name: "Human",
              characters: [
                  {
                      id: 47,
                      name: "Abraham Lincoln"
                  }
              ]
          }
      ]
  }
  </code></pre>
  
  <p>It's pretty close to what I want, but not quite there. I'd like it so that the first object inside <code>results</code> would be the one with the <code>id</code> of 4 since the <code>name</code> field is the most relevant to the search query (?name=human). (I don't really care about how the rest is ordered.) It seems that currently it is sorting the results by ascending <code>id</code>. Anyone know a good way to handle this? Thanks!</p>
  
  <p>Here is my api folder's views.py</p>
  
  <pre><code>class SpeciesFilter(django_filters.FilterSet):
      name = django_filters.CharFilter(name="name", lookup_type=("icontains"))
      class Meta:
          model = Species
          fields = ['name']
  
  class SpeciesViewSet(viewsets.ModelViewSet):
      queryset = Species.objects.all()
      serializer_class = SpeciesSerializer
      filter_backends = (filters.DjangoFilterBackend,)
      # search_fields = ('name',)
      filter_class = SpeciesFilter
  </code></pre>