mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-06 09:12:55 +00:00
@@ -23,6 +23,15 @@ pub struct FieldEntry {
|
||||
}
|
||||
|
||||
impl FieldEntry {
|
||||
/// Creates a new field entry given a name and a field type
|
||||
pub fn new(field_name: String, field_type: FieldType) -> FieldEntry {
|
||||
assert!(is_valid_field_name(&field_name));
|
||||
FieldEntry {
|
||||
name: field_name,
|
||||
field_type,
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new u64 field entry in the schema, given
|
||||
/// a name, and some options.
|
||||
pub fn new_text(field_name: String, text_options: TextOptions) -> FieldEntry {
|
||||
|
||||
Reference in New Issue
Block a user