pub struct IndexSchema {
pub version: u8,
pub table: TableName,
pub db_schema: DatabaseSchema,
pub primary_key: Option<ColumnName>,
pub doc_id: Option<ColumnName>,
pub soft_delete: Option<SoftDelete>,
pub filters: Option<Vec<Filter>>,
pub fields: Vec<Field>,
}Expand description
The shape of a single search document: a root table and the fields built from its columns and related tables.
Fields§
§version: u8§table: TableName§db_schema: DatabaseSchema§primary_key: Option<ColumnName>§doc_id: Option<ColumnName>§soft_delete: Option<SoftDelete>§filters: Option<Vec<Filter>>Root filters: only root rows matching every filter become documents.
A row that stops matching emits a tombstone, exactly like
soft_delete — both fold into the document
query’s WHERE, so “no row came back” means “this document should not
exist”.
fields: Vec<Field>Implementations§
Source§impl IndexSchema
impl IndexSchema
Sourcepub fn resolve(&self, index: IndexName) -> IndexMapping
pub fn resolve(&self, index: IndexName) -> IndexMapping
Project this schema into its fully-typed IndexMapping.
Trait Implementations§
Source§impl Clone for IndexSchema
impl Clone for IndexSchema
Source§fn clone(&self) -> IndexSchema
fn clone(&self) -> IndexSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexSchema
impl Debug for IndexSchema
Source§impl<'de> Deserialize<'de> for IndexSchema
impl<'de> Deserialize<'de> for IndexSchema
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
Source§impl Hash for IndexSchema
impl Hash for IndexSchema
Auto Trait Implementations§
impl Freeze for IndexSchema
impl RefUnwindSafe for IndexSchema
impl Send for IndexSchema
impl Sync for IndexSchema
impl Unpin for IndexSchema
impl UnsafeUnpin for IndexSchema
impl UnwindSafe for IndexSchema
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