code: def test_field_facets():
      def check(method):
          with TempIndex(get_schema()) as ix:
              method(ix)
              with ix.searcher() as s:
                  results = s.search(query.Every(), groupedby="tag")
                  groups = results.groups()
                  assert sorted(groups.items()) == [
                      (u("one"), [0, 6]),
                      (u("three"), [1, 3, 7, 8]),
                      (u("two"), [2, 4, 5]),
                  ]
  
      check(make_single_index)
      check(make_multi_index)
  
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 25 for calling a global function with example usage: test_field_facets() without return types