[][src]Trait pallet::DocumentLike

pub trait DocumentLike: Serialize + DeserializeOwned {
    type IndexFieldsType;
    fn as_index_document(
        &self,
        index_fields: &Self::IndexFieldsType
    ) -> Result<Document>; fn tree_builder() -> TreeBuilder { ... }
fn index_builder() -> IndexBuilder<Self::IndexFieldsType> { ... } }

Defines methods for building the index schema and creating a tantivy::Document.

pallet_macros provides a way to automatically derive this trait.

Associated Types

type IndexFieldsType

The container for an index's fields.

When using pallet_macros, this is a wrapped Vec<tantivy::schema::Field>.

Loading content...

Required methods

fn as_index_document(
    &self,
    index_fields: &Self::IndexFieldsType
) -> Result<Document>

Given the specified document and fields container, returns a tantivy::Document.

Loading content...

Provided methods

Loading content...

Implementors

Loading content...