Trait pallet::DocumentLike[][src]

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[src]

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>
[src]

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

Loading content...

Provided methods

fn tree_builder() -> TreeBuilder[src]

Can be provided to set some or all of the Tree config.

Will be merged with any configuration provided in StoreBuilder::tree_builder

fn index_builder() -> IndexBuilder<Self::IndexFieldsType>[src]

Can be provided to set some or all of the Index config.

Will be merged with any configuration provided in StoreBuilder::index_builder

Loading content...

Implementors

Loading content...