code: def test_multi():
      schema = fields.Schema(
          id=fields.ID(stored=True), content=fields.KEYWORD(stored=True)
      )
      with TempIndex(schema, "multi") as ix:
          writer = ix.writer()
          # Deleted 1
          writer.add_document(
              id=u("1"), content=u("alfa bravo charlie")
          )
          # Deleted 1
          writer.add_document(
              id=u("2"), content=u("bravo charlie delta echo")
          )
          # Deleted 2
          writer.add_document(
              id=u("3"), content=u("charlie delta echo foxtrot")
          )
          writer.commit()
  
          writer = ix.writer()
          writer.delete_by_term("id", "1")
          writer.delete_by_term("id", "2")
          writer.add_document(
              id=u("4"), content=u("apple bear cherry donut")
          )
          writer.add_document(
              id=u("5"), content=u("bear cherry donut eggs")
          )
          # Deleted 2
          writer.add_document(
              id=u("6"), content=u("delta echo foxtrot golf")
          )
          # no d
          writer.add_document(
              id=u("7"), content=u("echo foxtrot golf hotel")
          )
          writer.commit(merge=False)
  
          writer = ix.writer()
          writer.delete_by_term("id", "3")
          writer.delete_by_term("id", "6")
          writer.add_document(
              id=u("8"), content=u("cherry donut eggs falafel")
          )
          writer.add_document(
              id=u("9"), content=u("donut eggs falafel grape")
          )
          writer.add_document(
              id=u("A"), content=u(" foxtrot golf hotel india")
          )
          writer.commit(merge=False)
  
          assert ix.doc_count() == 6
  
          with ix.searcher() as s:
              r = s.search(
                  query.Prefix("content", u("d")), optimize=False
              )
              assert sorted([d["id"] for d in r]) == [
                  "4",
                  "5",
                  "8",
                  "9",
              ]
  
              r = s.search(query.Prefix("content", u("d")))
              assert sorted([d["id"] for d in r]) == [
                  "4",
                  "5",
                  "8",
                  "9",
              ]
  
              r = s.search(query.Prefix("content", u("d")), limit=None)
              assert sorted([d["id"] for d in r]) == [
                  "4",
                  "5",
                  "8",
                  "9",
              ]
  
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 20 for calling a global function with example usage: test_multi() without return types