code: def test_score_facet():
      schema = fields.Schema(
          id=fields.STORED, a=fields.TEXT, b=fields.TEXT, c=fields.ID
      )
      ix = RamStorage().create_index(schema)
      w = ix.writer()
      w.add_document(
          id=1, a=u("alfa alfa bravo"), b=u("bottle"), c=u("c")
      )
      w.add_document(
          id=2, a=u("alfa alfa alfa"), b=u("bottle"), c=u("c")
      )
      w.commit()
      w = ix.writer()
      w.add_document(
          id=3, a=u("alfa bravo bravo"), b=u("bottle"), c=u("c")
      )
      w.add_document(
          id=4, a=u("alfa bravo alfa"), b=u("apple"), c=u("c")
      )
      w.commit(merge=False)
      w = ix.writer()
      w.add_document(
          id=5, a=u("alfa bravo bravo"), b=u("apple"), c=u("c")
      )
      w.add_document(
          id=6, a=u("alfa alfa alfa"), b=u("apple"), c=u("c")
      )
      w.commit(merge=False)
  
      with ix.searcher() as s:
          facet = sorting.MultiFacet(["b", sorting.ScoreFacet()])
          r = s.search(q=query.Term("a", u("alfa")), sortedby=facet)
          assert [h["id"] for h in r] == [6, 4, 5, 2, 1, 3]
  
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 10 for calling a global function with example usage: test_score_facet() without return types