From 3df037961f07ec2e3232164e186d085cebe13067 Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Tue, 30 Apr 2019 13:14:01 +0900 Subject: [PATCH] Added more info to fast fields. --- src/schema/schema.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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)