pub struct IndexDef {
pub name: String,
pub fields: Vec<FieldDef>,
pub default_fields: Vec<String>,
pub query_routers: Vec<QueryRouterRule>,
}Expand description
Parsed index definition
Fields§
§name: String§fields: Vec<FieldDef>§default_fields: Vec<String>§query_routers: Vec<QueryRouterRule>Query router rules for routing queries to specific fields
Implementations§
Source§impl IndexDef
impl IndexDef
Sourcepub fn to_query_router(&self) -> Result<Option<QueryFieldRouter>>
pub fn to_query_router(&self) -> Result<Option<QueryFieldRouter>>
Create a QueryFieldRouter from the query router rules
Returns None if there are no query router rules defined. Returns Err if any regex pattern is invalid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexDef
impl RefUnwindSafe for IndexDef
impl Send for IndexDef
impl Sync for IndexDef
impl Unpin for IndexDef
impl UnwindSafe for IndexDef
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