pub struct TextPluginConfig {
pub enabled: bool,
pub analyzer: String,
pub seed_chars: usize,
pub predicates: Vec<String>,
}Expand description
Plugin configuration.
Fields§
§enabled: boolWhether the index is maintained. The enablement switch: a config
file may be parked on disk with enabled = false without
uninstalling the plugin at the composition site.
analyzer: StringAnalyzer for the full-text field (one menu entry of ANALYZERS).
seed_chars: usizeCharacters stored in the bounded prefix and suffix fields.
predicates: Vec<String>Optional allowlist of predicate IRIs to index. Absent in text.toml
means [DEFAULT_TEXT_PREDICATES]; an explicit empty array ([])
means every string-literal predicate (the old behaviour); a populated
list keeps the index to the predicates an application actually
searches (sdo:name, sdo:description, …) and skips the rest at
write time.
Implementations§
Source§impl TextPluginConfig
impl TextPluginConfig
Sourcepub fn normalized_predicates(&self) -> Vec<&str>
pub fn normalized_predicates(&self) -> Vec<&str>
The predicate allowlist as a canonical, sorted, deduplicated list.
Sourcepub fn predicate_allowlist(&self) -> Option<HashSet<StrHash>>
pub fn predicate_allowlist(&self) -> Option<HashSet<StrHash>>
The allowlist as IRI hashes, or None when every predicate is indexed.
Sourcepub fn fingerprint(&self) -> String
pub fn fingerprint(&self) -> String
Canonical, version-stable identity of the schema-affecting settings.
Carried in RebuildTextIndexRequest and compared against the
partition’s Describe at startup and against the
QueryContext::text_index_fingerprint at plan time. Human-readable
on purpose (it appears in waratah text status), and not a hash, so
a collision cannot silently trust an index built by other settings.
The predicate list is comma-separated, and a comma is legal inside an
IRI (http://ex/a,b), so each IRI escapes % and then , before the
join. Without that, ["http://ex/a,b"] and ["http://ex/a", "http://ex/b"] would produce the same fingerprint, and an index built
for one list would be trusted by the other.
Trait Implementations§
Source§impl Clone for TextPluginConfig
impl Clone for TextPluginConfig
Source§fn clone(&self) -> TextPluginConfig
fn clone(&self) -> TextPluginConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextPluginConfig
impl Debug for TextPluginConfig
Source§impl Default for TextPluginConfig
impl Default for TextPluginConfig
Source§impl PartialEq for TextPluginConfig
impl PartialEq for TextPluginConfig
impl Eq for TextPluginConfig
impl StructuralPartialEq for TextPluginConfig
Auto Trait Implementations§
impl Freeze for TextPluginConfig
impl RefUnwindSafe for TextPluginConfig
impl Send for TextPluginConfig
impl Sync for TextPluginConfig
impl Unpin for TextPluginConfig
impl UnsafeUnpin for TextPluginConfig
impl UnwindSafe for TextPluginConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].