.
This commit is contained in:
+4
-4
@@ -17,7 +17,7 @@ use ldp::traverse::Traverse;
|
||||
use ldp::{RdfSource, RdfSourceUpdateResponse, ResourceRequestBuilder, SerializationOptions};
|
||||
use oxigraph::io::RdfFormat;
|
||||
use oxigraph::model::vocab::{rdf, rdfs};
|
||||
use oxigraph::model::{BaseDirection, Dataset, NamedNode, NamedNodeRef, Quad, Term, TermRef};
|
||||
use oxigraph::model::{BaseDirection, Dataset, NamedNode, NamedNodeRef, Quad, Term};
|
||||
use tracing::{debug, debug_span, error, trace};
|
||||
use crate::rdf::language;
|
||||
use crate::widget::iri_input::iri_input;
|
||||
@@ -105,11 +105,11 @@ impl Publisher {
|
||||
});
|
||||
|
||||
let index = SearchIndex::builder()
|
||||
//.with_path("/home/alex/.local/share/org.graphofliberty.desktop/index")
|
||||
.with_path("/home/alex/.local/share/org.graphofliberty.desktop/index")
|
||||
.build()
|
||||
.expect("Failed to build search index");
|
||||
|
||||
debug_span!("Ontology Indexing").in_scope(|| {
|
||||
/*debug_span!("Ontology Indexing").in_scope(|| {
|
||||
let mut counter = 0;
|
||||
let mut writer = index.writer().expect("Failed to build index writer");
|
||||
let index = ontology.index(&*language::ENGLISH_OR_UNTAGGED).expect("Unable to generate index of entities");
|
||||
@@ -127,7 +127,7 @@ impl Publisher {
|
||||
}
|
||||
writer.commit().expect("Failed to commit changes to search index");
|
||||
debug!("Added {counter} documents to search index");
|
||||
});
|
||||
});*/
|
||||
|
||||
let mut abbreviated_datatypes = ontology
|
||||
.datatypes()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use std::borrow::Borrow;
|
||||
use crate::error;
|
||||
use crate::rdf::vocab::gl;
|
||||
use oxigraph::model::vocab::{rdf, rdfs, xsd};
|
||||
@@ -9,7 +8,8 @@ use std::fmt::Display;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::LazyLock;
|
||||
use oxigraph::store::Store;
|
||||
use crate::rdf::conversion;
|
||||
use tracing::debug_span;
|
||||
use crate::rdf::{conversion, materialize};
|
||||
use crate::rdf::language::LanguageCondition;
|
||||
|
||||
static PREFIXES: LazyLock<BTreeMap<String, String>> = LazyLock::new(|| {
|
||||
@@ -60,7 +60,7 @@ impl OntologyBuilder {
|
||||
|
||||
pub fn build(self) -> error::Result<Ontology> {
|
||||
let mut store = if let Some(path) = self.path {
|
||||
Store::open(path)
|
||||
Store::open_read_only(path)
|
||||
} else {
|
||||
Store::new()
|
||||
}?;
|
||||
|
||||
Reference in New Issue
Block a user