diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-16 00:08:24 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-16 00:08:24 +0200 |
commit | 783198703569dd1d1c17f2b3a40a62f20a6f8a44 (patch) | |
tree | 41aba65cb338083bd4eb0b143d7c629b0df2d3db /base/src/database.rs | |
parent | f369728cc783493f8f6cab921b3c609d127bf6f2 (diff) | |
download | jellything-783198703569dd1d1c17f2b3a40a62f20a6f8a44.tar jellything-783198703569dd1d1c17f2b3a40a62f20a6f8a44.tar.bz2 jellything-783198703569dd1d1c17f2b3a40a62f20a6f8a44.tar.zst |
index parentt
Diffstat (limited to 'base/src/database.rs')
-rw-r--r-- | base/src/database.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/base/src/database.rs b/base/src/database.rs index 7755016..d890956 100644 --- a/base/src/database.rs +++ b/base/src/database.rs @@ -21,7 +21,7 @@ use std::{ }; use tantivy::{ directory::MmapDirectory, - schema::{Field, Schema, FAST, INDEXED, STORED, TEXT}, + schema::{Field, Schema, FAST, INDEXED, STORED, STRING, TEXT}, DateOptions, Index, IndexReader, IndexWriter, ReloadPolicy, }; @@ -89,6 +89,7 @@ pub struct NodeIndex { pub title: Field, pub releasedate: Field, pub description: Field, + pub parent: Field, pub f_index: Field, } impl NodeIndex { @@ -97,6 +98,7 @@ impl NodeIndex { let id = schema.add_text_field("id", TEXT | STORED | FAST); let title = schema.add_text_field("title", TEXT); let description = schema.add_text_field("description", TEXT); + let parent = schema.add_text_field("parent", STRING | FAST); let f_index = schema.add_u64_field("index", FAST); let releasedate = schema.add_date_field( "releasedate", @@ -120,6 +122,7 @@ impl NodeIndex { writer: writer.into(), reader, schema, + parent, f_index, releasedate, id, |