[−][src]Struct claw::inverted_index::InvertedIndex
Contains inverted index lists.
Methods
impl InvertedIndex
[src]
pub fn from_file(file_name: &str) -> Result<Self, Error>
[src]
Create a new InvertedIndex from a file.
pub fn get_lists(&self) -> &HashMap<String, Vec<IndexEntry>>
[src]
Get a reference to the HashMap containing the inverted lists.
pub fn get_mut_lists(&mut self) -> &mut HashMap<String, Vec<IndexEntry>>
[src]
Get a mutable reference to the HashMap containing the inverted lists.
pub fn take(self) -> HashMap<String, Vec<IndexEntry>>
[src]
pub fn process_query_output(
&self,
queries: Vec<String>
) -> Result<String, Error>
[src]
&self,
queries: Vec<String>
) -> Result<String, Error>
Finds the intersection of the lists identified by the queries. Returns it as formatted output in a single String.
pub fn process_query(&self, queries: Vec<String>) -> Result<Vec<u32>, Error>
[src]
Finds the intersection of the lists identified by the queries. Return as a vec of indices.
Trait Implementations
impl Display for InvertedIndex
[src]
impl Debug for InvertedIndex
[src]
Auto Trait Implementations
impl Send for InvertedIndex
impl Sync for InvertedIndex
impl Unpin for InvertedIndex
impl UnwindSafe for InvertedIndex
impl RefUnwindSafe for InvertedIndex
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,