pub struct BlindIndexSearch { /* private fields */ }
Implementations§
Source§impl BlindIndexSearch
impl BlindIndexSearch
Sourcepub fn tokenize_query(
&self,
query: &str,
partition_id: Option<&str>,
) -> Result<HashSet<u32>>
pub fn tokenize_query( &self, query: &str, partition_id: Option<&str>, ) -> Result<HashSet<u32>>
Generate the list of tokens to use to find entries that match the search query, given the specified partition_id. query - The string you want to tokenize and hash partition_id - An extra string you want to include in every hash, this allows 2 queries with different partition_ids to produce a different set of tokens for the same query
Sourcepub fn tokenize_data(
&self,
data: &str,
partition_id: Option<&str>,
) -> Result<HashSet<u32>>
pub fn tokenize_data( &self, data: &str, partition_id: Option<&str>, ) -> Result<HashSet<u32>>
Generate the list of tokens to create a search entry for data
. This function will also return some random values in the HashSet, which will make
it harder for someone to know what the input was. Because of this, calling this function will not be the same as tokenize_query
, but tokenize_query
will always
return a subset of the values returned by tokenize_data
.
data - The string you want to tokenize and hash partition_id - An extra string you want to include in every hash, this allows 2 queries with different partition_ids to produce a different set of tokens for the same data
Trait Implementations§
Source§impl Debug for BlindIndexSearch
impl Debug for BlindIndexSearch
Source§impl TryFrom<&[u8]> for BlindIndexSearch
impl TryFrom<&[u8]> for BlindIndexSearch
Source§type Error = IronOxideErr
type Error = IronOxideErr
Auto Trait Implementations§
impl !Freeze for BlindIndexSearch
impl RefUnwindSafe for BlindIndexSearch
impl Send for BlindIndexSearch
impl Sync for BlindIndexSearch
impl Unpin for BlindIndexSearch
impl UnwindSafe for BlindIndexSearch
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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