code: def test_add_vectored_field():
      schema = fields.Schema(id=fields.ID(stored=True), f1=fields.TEXT)
      ix = RamStorage().create_index(schema)
      with ix.writer() as w:
          w.add_document(id=u("a"), f1=u("Testing one two three"))
  
      with ix.writer() as w:
          w.add_field("f2", fields.TEXT(vector=True))
          w.add_document(id=u("b"), f2=u("Frosting four five six"))
  
      with ix.searcher() as s:
          docnum1 = s.document_number(id="a")
          assert not s.has_vector(docnum1, "f1")
  
          docnum2 = s.document_number(id="b")
          assert not s.has_vector(docnum2, "f1")
          assert s.has_vector(docnum2, "f2")
  
file_path: whoosh/tests/test_vectors.py
imports: from __future__ import with_statement
  from whoosh import fields, formats
  from whoosh.compat import u
  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_add_vectored_field() without return types