mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-02 16:40:43 +00:00
Added more info to fast fields.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user