code: def field(self, field_name, boost=1, extractor=None):
          
          if "/" in field_name:
              raise ValueError("Field {} contains illegal character `/`")
  
          self._fields[field_name] = Field(field_name, boost, extractor)
docs: Adds a field to the list of document fields that will be indexed.
  
          Every document being indexed should have this field. None values for
          this field in indexed documents will not cause errors but will limit
          the chance of that document being retrieved by searches.
  
          All fields should be added before adding documents to the index. Adding
          fields after a document has been indexed will have no effect on already
          indexed documents.
  
          Fields can be boosted at build time. This allows terms within that
          field to have more importance on search results. Use a field boost to
          specify that matches within one field are more important that other
          fields.
  
          Args:
              field_name (str): Name of the field to be added, must not include
                  a forward slash '/'.
              boost (int): Optional boost factor to apply to field.
              extractor (callable): Optional function to extract a field from
                  the document.
  
          Raises:
              ValueError: If the field name contains a `/`.