code: def test_compound_sort():
      fspec = fields.KEYWORD(stored=True, sortable=True)
      schema = fields.Schema(a=fspec, b=fspec, c=fspec)
      ix = RamStorage().create_index(schema)
  
      alist = u(
          "alfa bravo alfa bravo alfa bravo alfa bravo alfa bravo"
      ).split()
      blist = u(
          "alfa bravo charlie alfa bravo charlie alfa bravo charlie alfa"
      ).split()
      clist = u(
          "alfa bravo charlie delta echo foxtrot golf hotel india juliet"
      ).split()
      assert all(len(ls) == 10 for ls in (alist, blist, clist))
  
      with ix.writer() as w:
          for i in xrange(10):
              w.add_document(a=alist[i], b=blist[i], c=clist[i])
  
      with ix.searcher() as s:
          q = query.Every()
          sortedby = [
              sorting.FieldFacet("a"),
              sorting.FieldFacet("b", reverse=True),
              sorting.FieldFacet("c"),
          ]
  
          r = s.search(q, sortedby=sortedby)
          output = []
          for hit in r:
              output.append(" ".join((hit["a"], hit["b"], hit["c"])))
  
          assert output == [
              "alfa charlie charlie",
              "alfa charlie india",
              "alfa bravo echo",
              "alfa alfa alfa",
              "alfa alfa golf",
              "bravo charlie foxtrot",
              "bravo bravo bravo",
              "bravo bravo hotel",
              "bravo alfa delta",
              "bravo alfa juliet",
          ]
  
imports: from __future__ import with_statement
  from datetime import datetime, timedelta
  import random
  from whoosh import fields, query, sorting, columns
  from whoosh.compat import u
  from whoosh.compat import permutations, xrange
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 37 for calling a global function with example usage: test_compound_sort() without return types