pub struct AnalysisConfig {
pub char_filters: HashMap<String, Value>,
pub tokenizers: HashMap<String, Value>,
pub filters: HashMap<String, Value>,
pub analyzers: HashMap<String, Value>,
}Expand description
Parsed analysis configuration from index settings.
Serializable so it can be persisted in the index metadata.
Fields§
§char_filters: HashMap<String, Value>§tokenizers: HashMap<String, Value>§filters: HashMap<String, Value>§analyzers: HashMap<String, Value>Implementations§
Source§impl AnalysisConfig
impl AnalysisConfig
Sourcepub fn from_json(analysis: &Value) -> Result<Self, String>
pub fn from_json(analysis: &Value) -> Result<Self, String>
Parse from the settings.analysis JSON object.
Sourcepub fn build_registry(&self) -> Result<AnalyzerRegistry, String>
pub fn build_registry(&self) -> Result<AnalyzerRegistry, String>
Build an AnalyzerRegistry from this configuration.
Starts with all built-in analyzers, then adds custom analyzers defined in the config. Validates that all referenced components exist.
Trait Implementations§
Source§impl Clone for AnalysisConfig
impl Clone for AnalysisConfig
Source§fn clone(&self) -> AnalysisConfig
fn clone(&self) -> AnalysisConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnalysisConfig
impl Debug for AnalysisConfig
Source§impl Default for AnalysisConfig
impl Default for AnalysisConfig
Source§fn default() -> AnalysisConfig
fn default() -> AnalysisConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AnalysisConfig
impl RefUnwindSafe for AnalysisConfig
impl Send for AnalysisConfig
impl Sync for AnalysisConfig
impl Unpin for AnalysisConfig
impl UnsafeUnpin for AnalysisConfig
impl UnwindSafe for AnalysisConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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