diff --git a/src/schema/schema.rs b/src/schema/schema.rs index 7d2be9ac9..7afa8e639 100644 --- a/src/schema/schema.rs +++ b/src/schema/schema.rs @@ -130,7 +130,16 @@ impl SchemaBuilder { self.add_field(field_entry) } - /// Adds a fast bytes field to the schema + /// Adds a fast bytes field to the schema. + /// + /// Bytes field are not searchable and are only used + /// as fast field, to associate any kind of payload + /// to a document. + /// + /// For instance, learning-to-rank often requires to access + /// some document features at scoring time. + /// These can be serializing and stored as a bytes field to + /// get access rapidly when scoring each document. pub fn add_bytes_field(&mut self, field_name: &str) -> Field { let field_entry = FieldEntry::new_bytes(field_name.to_string()); self.add_field(field_entry)