code: def build(self):
          
          self._calculate_average_field_lengths()
          self._create_field_vectors()
          self._create_token_set()
  
          return Index(
              inverted_index=self.inverted_index,
              field_vectors=self.field_vectors,
              token_set=self.token_set,
              fields=list(self._fields.keys()),
              pipeline=self.search_pipeline,
          )
docs: Builds the index, creating an instance of `lunr.Index`.
  
          This completes the indexing process and should only be called once all
          documents have been added to the index.