code: def test_lengths2():
      schema = fields.Schema(text=fields.TEXT(stored=True))
      ix = RamStorage().create_index(schema)
      count = 0
      for _ in xrange(3):
          w = ix.writer()
          for ls in permutations(u("alfa bravo charlie").split()):
              if "bravo" in ls and "charlie" in ls:
                  count += 1
              w.add_document(text=u(" ").join(ls))
          w.commit(merge=False)
  
      with ix.searcher() as s:
          q = query.Or(
              [
                  query.Term("text", u("bravo")),
                  query.Term("text", u("charlie")),
              ]
          )
          r = s.search(q, limit=None)
          assert len(r) == count
  
          r = s.search(q, limit=3)
          assert len(r) == count
  
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 18 for calling a global function with example usage: test_lengths2() without return types