code: def test_min_max_id():
      schema = fields.Schema(id=fields.STORED, t=fields.TEXT)
      ix = RamStorage().create_index(schema)
      w = ix.writer()
      w.add_document(id=0, t=u("alfa bravo charlie"))
      w.add_document(id=1, t=u("bravo charlie delta"))
      w.add_document(id=2, t=u("charlie delta echo"))
      w.add_document(id=3, t=u("delta echo foxtrot"))
      w.add_document(id=4, t=u("echo foxtrot golf"))
      w.commit()
  
      with ix.reader() as r:
          ti = r.term_info("t", u("delta"))
          assert ti.min_id() == 1
          assert ti.max_id() == 3
  
          ti = r.term_info("t", u("alfa"))
          assert ti.min_id() == 0
          assert ti.max_id() == 0
  
          ti = r.term_info("t", u("foxtrot"))
          assert ti.min_id() == 3
          assert ti.max_id() == 4
  
      w = ix.writer()
      w.add_document(id=5, t=u("foxtrot golf hotel"))
      w.add_document(id=6, t=u("golf hotel alfa"))
      w.add_document(id=7, t=u("hotel alfa bravo"))
      w.add_document(id=8, t=u("alfa bravo charlie"))
      w.commit(merge=False)
  
      with ix.reader() as r:
          ti = r.term_info("t", u("delta"))
          assert ti.min_id() == 1
          assert ti.max_id() == 3
  
          ti = r.term_info("t", u("alfa"))
          assert ti.min_id() == 0
          assert ti.max_id() == 8
  
          ti = r.term_info("t", u("foxtrot"))
          assert ti.min_id() == 3
          assert ti.max_id() == 5
  
file_path: whoosh/tests/test_quality.py
imports: from __future__ import with_statement
  import random
  from whoosh import fields, matching, scoring
  from whoosh.compat import u, xrange
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.numeric import length_to_byte, byte_to_length
label_desc: Use image node_id 5 for calling a global function with example usage: test_min_max_id() without return types