title: Drupal Search API custom search field order
body: <p>am using search api views module to search my apache Solr Search engine. I would like to have a custom order for the returned results. I would like the jq_articles results to appear first, then books, then mydocuments.</p>
  
  <p>How can I have this customer order (with is neither ASC or DESC) for my returned results?</p>
  
  <p>I mean I need something like $query->orderby('jq_articles, 'books', 'mydocuments');</p>
  
  <p>This is how my query_alter looks at the time being:</p>
  
  <pre><code>&lt;?php
  function mymodule_search_api_query_alter(SearchApiQueryInterface $query) {
      $filters = &amp;$query-&gt;getFilter()-&gt;getFilters();
      foreach ($filters as $i =&gt; $filter) {
          $condition="";
          $finalfilters=&amp;$filter-&gt;getFilters();
          foreach($finalfilters as $z =&gt; $singlefilter){
                      if($singlefilter[0]=='type') {
                           $condition=$singlefilter[1];
                           unset($finalfilters[$z]);
                      }
           }
      }
            $filter = $query-&gt;createFilter('OR');
  switch($condition) {
              case 'journals':
                $filter-&gt;condition('type', 'jq_articles');
                break;
              case 'books':
                  $filter-&gt;condition('type', 'books');
                  break;
              case 'mydocuments':
              $filter-&gt;condition('type', 'mydocuments');
              default:
              $filter-&gt;condition('type', 'mydocuments');
              $filter-&gt;condition('type', 'books');
              $filter-&gt;condition('type', 'jq_articles');
              break;
  }
            $query-&gt;filter($filter);
  }
  ?&gt;
  </code></pre>