summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Masurel <paul.masurel@gmail.com>2019-04-30 13:14:01 +0900
committerPaul Masurel <paul.masurel@gmail.com>2019-04-30 13:14:01 +0900
commit3df037961f07ec2e3232164e186d085cebe13067 (patch)
tree02a4379ff4172b7a582d315c0e652a1c8cce9c00
parentdac50c6aeb471868d6b1462426907ecfce3eb420 (diff)
Added more info to fast fields.
-rw-r--r--src/schema/schema.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/schema/schema.rs b/src/schema/schema.rs
index 7d2be9a..7afa8e6 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)