code: def test_simple_indexing():
      schema = fields.Schema(text=fields.TEXT, id=fields.STORED)
      domain = (
          u("alfa"),
          u("bravo"),
          u("charlie"),
          u("delta"),
          u("echo"),
          u("foxtrot"),
          u("golf"),
          u("hotel"),
          u("india"),
          u("juliet"),
          u("kilo"),
          u("lima"),
          u("mike"),
          u("november"),
      )
      docs = defaultdict(list)
      with TempIndex(schema, "simple") as ix:
          with ix.writer() as w:
              for i in xrange(100):
                  smp = random.sample(domain, 5)
                  for word in smp:
                      docs[word].append(i)
                  w.add_document(text=u(" ").join(smp), id=i)
  
          with ix.searcher() as s:
              for word in domain:
                  rset = sorted(
                      [
                          hit["id"]
                          for hit in s.search(
                              query.Term("text", word), limit=None
                          )
                      ]
                  )
                  assert rset == docs[word]
  
imports: from __future__ import with_statement
  import random
  from collections import defaultdict
  from datetime import datetime
  import pytest
  from whoosh import analysis, fields, index, qparser, query, __version__
  from whoosh.compat import b, u, xrange, text_type, permutations
  from whoosh.filedb.filestore import RamStorage
  from whoosh.writing import IndexingError
  from whoosh.util.numeric import length_to_byte, byte_to_length
  from whoosh.util.testing import TempIndex, TempStorage
label_desc: Use image node_id 4 for calling a global function with example usage: test_simple_indexing() without return types