pub struct Index<N>{ /* private fields */ }Expand description
インデックス ドキュメント単位でインデックスを作成、検索するための構造体です
Implementations§
Source§impl<N> Index<N>where
N: Num + Into<f64> + AddAssign + MulAssign + NormalizedMultiply + Copy + NormalizedBounded,
f64: IntoNormalizer<N>,
impl<N> Index<N>where
N: Num + Into<f64> + AddAssign + MulAssign + NormalizedMultiply + Copy + NormalizedBounded,
f64: IntoNormalizer<N>,
pub fn new() -> Self
pub fn generate_query_mask(&self, tokens: &[&str]) -> ZeroSpVec<N>
pub fn generate_query(&self, tokens: &[&str]) -> ZeroSpVec<N>
pub fn search_cosine_similarity( &self, query: &ZeroSpVec<N>, ) -> Vec<(String, f64)>
pub fn search_cosine_similarity_parallel( &self, query: &ZeroSpVec<N>, thread_count: usize, ) -> Vec<(String, f64)>
Trait Implementations§
Source§impl<N> Clone for Index<N>where
N: Num + Into<f64> + AddAssign + MulAssign + NormalizedMultiply + Copy + NormalizedBounded + Clone,
impl<N> Clone for Index<N>where
N: Num + Into<f64> + AddAssign + MulAssign + NormalizedMultiply + Copy + NormalizedBounded + Clone,
Source§impl<N> Debug for Index<N>where
N: Num + Into<f64> + AddAssign + MulAssign + NormalizedMultiply + Copy + NormalizedBounded + Debug,
impl<N> Debug for Index<N>where
N: Num + Into<f64> + AddAssign + MulAssign + NormalizedMultiply + Copy + NormalizedBounded + Debug,
Source§impl<'de, N> Deserialize<'de> for Index<N>where
N: Num + Into<f64> + AddAssign + MulAssign + NormalizedMultiply + Copy + NormalizedBounded + Deserialize<'de>,
impl<'de, N> Deserialize<'de> for Index<N>where
N: Num + Into<f64> + AddAssign + MulAssign + NormalizedMultiply + Copy + NormalizedBounded + Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<N> Freeze for Index<N>
impl<N> RefUnwindSafe for Index<N>where
N: RefUnwindSafe,
impl<N> Send for Index<N>where
N: Send,
impl<N> Sync for Index<N>where
N: Sync,
impl<N> Unpin for Index<N>where
N: Unpin,
impl<N> UnwindSafe for Index<N>where
N: UnwindSafe + RefUnwindSafe,
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