code: def test_more_like_this(model=classify.Bo2Model):
      docs = [
          u("alfa bravo charlie delta echo foxtrot golf"),
          u("delta echo foxtrot golf hotel india juliet"),
          u("echo foxtrot golf hotel india juliet kilo"),
          u("foxtrot golf hotel india juliet kilo lima"),
          u("golf hotel india juliet kilo lima mike"),
          u("foxtrot golf hotel india alfa bravo charlie"),
      ]
  
      def _check(schema, **kwargs):
          ix = RamStorage().create_index(schema)
          with ix.writer() as w:
              for i, text in enumerate(docs):
                  w.add_document(id=text_type(i + 1), text=text)
  
          with ix.searcher() as s:
              docnum = s.document_number(id=u("1"))
              r = s.more_like(docnum, "text", model=model, **kwargs)
              assert [hit["id"] for hit in r] == ["6", "2", "3"]
  
      schema = fields.Schema(
          id=fields.ID(stored=True), text=fields.TEXT(stored=True)
      )
      _check(schema)
  
      ana = analysis.StandardAnalyzer()
      schema = fields.Schema(
          id=fields.ID(stored=True),
          text=fields.TEXT(analyzer=ana, vector=formats.Frequency()),
      )
      _check(schema)
  
      schema = fields.Schema(
          id=fields.ID(stored=True), text=fields.TEXT
      )
      _check(schema, text=docs[0])
  
file_path: whoosh/tests/test_classify.py
imports: from __future__ import with_statement
  from whoosh import analysis, classify, fields, formats, query, reading
  from whoosh.compat import u, text_type
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 5 for calling a global function with example usage: test_more_like_this(model) without return types