code: def test_hit_column():
      # Not stored
      schema = fields.Schema(text=fields.TEXT())
      ix = RamStorage().create_index(schema)
      with ix.writer() as w:
          w.add_document(text=u("alfa bravo charlie"))
  
      with ix.searcher() as s:
          r = s.search(query.Term("text", "alfa"))
          assert len(r) == 1
          hit = r[0]
          with pytest.raises(KeyError):
              _ = hit["text"]
  
      # With column
      schema = fields.Schema(text=fields.TEXT(sortable=True))
      ix = RamStorage().create_index(schema)
      with ix.writer(codec=W3Codec()) as w:
          w.add_document(text=u("alfa bravo charlie"))
  
      with ix.searcher() as s:
          r = s.search(query.Term("text", "alfa"))
          assert len(r) == 1
          hit = r[0]
          assert hit["text"] == u("alfa bravo charlie")
  
imports: from __future__ import with_statement
  import pytest
  from whoosh import analysis, fields, formats, highlight, qparser, query
  from whoosh.codec.whoosh3 import W3Codec
  from whoosh.compat import u, xrange, text_type, permutations
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempStorage, TempIndex
label_desc: Use image node_id 21 for calling a global function with example usage: test_hit_column() without return types