code: def _create_field_vectors(self):
          
          field_vectors = {}
          term_idf_cache = {}
  
          for field_ref, term_frequencies in self.field_term_frequencies.items():
              _field_ref = FieldRef.from_string(field_ref)
              field_name = _field_ref.field_name
              field_length = self.field_lengths[field_ref]
              field_vector = Vector()
              field_boost = self._fields[field_name].boost
              doc_boost = self._documents[_field_ref.doc_ref].get("boost", 1)
  
              for term, tf in term_frequencies.items():
                  term_index = self.inverted_index[term]["_index"]
  
                  if term not in term_idf_cache:
                      idf = Idf(self.inverted_index[term], self.document_count)
                      term_idf_cache[term] = idf
                  else:
                      idf = term_idf_cache[term]
  
                  score = (
                      idf
                      * ((self._k1 + 1) * tf)
                      / (
                          self._k1
                          * (
                              1
                              - self._b
                              + self._b
                              * (field_length / self.average_field_length[field_name])
                          )
                          + tf
                      )
                  )
                  score *= field_boost
                  score *= doc_boost
                  score_with_precision = round(score, 3)
  
                  field_vector.insert(term_index, score_with_precision)
  
              field_vectors[field_ref] = field_vector
  
          self.field_vectors = field_vectors
docs: Builds a vector space model of every document using lunr.Vector.