From 0743fe7d67857a362bf0b422fd9296238a6e46aa Mon Sep 17 00:00:00 2001 From: trinity-1686a Date: Tue, 4 Aug 2026 18:24:15 +0200 Subject: [PATCH] reintroduce get_fast_field_tokenizer_name --- src/schema/json_object_options.rs | 9 +++++++++ src/schema/text_options.rs | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/schema/json_object_options.rs b/src/schema/json_object_options.rs index 7c62be349..e66c7700b 100644 --- a/src/schema/json_object_options.rs +++ b/src/schema/json_object_options.rs @@ -66,6 +66,15 @@ impl JsonObjectOptions { self.fast.is_some() } + /// Returns the tokenizer used for the fast field, if the json object + /// is a fast field and a tokenizer was configured for it. + #[inline] + pub fn get_fast_field_tokenizer_name(&self) -> Option<&str> { + self.fast + .as_ref() + .map(|fast_field_options| fast_field_options.tokenizer.as_str()) + } + /// Returns `true` iff dots in json keys should be expanded. /// /// When expand_dots is enabled, json object like diff --git a/src/schema/text_options.rs b/src/schema/text_options.rs index 48e51dfaa..ee796b905 100644 --- a/src/schema/text_options.rs +++ b/src/schema/text_options.rs @@ -118,6 +118,15 @@ impl TextOptions { self.fast.is_some() } + /// Returns the tokenizer used for the fast field, if the text field + /// is a fast field and a tokenizer was configured for it. + #[inline] + pub fn get_fast_field_tokenizer_name(&self) -> Option<&str> { + self.fast + .as_ref() + .map(|fast_field_options| fast_field_options.tokenizer.as_str()) + } + /// Returns true if values should be coerced to strings (numbers, null). #[inline] pub fn should_coerce(&self) -> bool {