pub trait SearchIndex<P> {
// Required method
fn search(&self, query: &Query) -> Result<HashSet<P>>;
}Expand description
This trait describes the minimum features an Index must support to be usable as a SearchIndex, for example in a SearchEngine.
Required Methods§
Sourcefn search(&self, query: &Query) -> Result<HashSet<P>>
fn search(&self, query: &Query) -> Result<HashSet<P>>
Perform a search on an index.
This function returns an HashSet of all matching results. It may not accept all enum values of Query but only a small subset. If a Query is not supported, this function returns UnsupportedQuery.
If the strings in the Query cannot be parsed to the expected payload type, this function returns MismatchedQueryType.