.
This commit is contained in:
+23
-2
@@ -1,11 +1,32 @@
|
||||
mod error;
|
||||
mod index;
|
||||
mod schema;
|
||||
pub mod subtitles;
|
||||
pub mod rdf;
|
||||
pub mod language;
|
||||
|
||||
use oxigraph::model::NamedNodeRef;
|
||||
pub use tantivy::TantivyDocument as SearchDocument;
|
||||
pub use tantivy::doc;
|
||||
pub use tantivy::schema::document::Value;
|
||||
pub use tantivy::schema::document::{Document, Value};
|
||||
pub use tantivy::indexer::IndexWriter;
|
||||
|
||||
pub use error::{Result, SearchError};
|
||||
pub use index::{SearchIndex, SearchIndexBuilder};
|
||||
pub use schema::Schema;
|
||||
pub use schema::Schema;
|
||||
|
||||
pub enum DocType {
|
||||
RdfProperty = 0,
|
||||
RdfsClass = 1,
|
||||
SkosConcept = 2,
|
||||
Person = 3,
|
||||
}
|
||||
|
||||
impl DocType {
|
||||
pub fn from_named_node(node: NamedNodeRef) -> Option<Self> {
|
||||
match node.as_str() {
|
||||
"http://rdaregistry.info/Elements/c/C10004" => Some(DocType::Person),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user