pallet
A searchable document datastore built on sled
and tantivy
.
Provides a typed-tree interface to a sled
database, with standard datastore ops (find
, create
, update
, delete
),
but also Lucene/Elasticsearch style searching.
The included pallet_macros
crate provides an easy way to derive pallet::DocumentLike
for data structs.
Usage
extern crate serde;
pallet_macros
See the example for usage. The following attributes can be used to customize the implementation:
tree_name
: A container level attribute to specify thesled::Tree
name.index_field_name
: Rename the field in the search schema.index_field_type
: Set the index field type, must implementInto<tantivy::schema::Value>
.index_field_options
: Set the index field options. By default, the options forString
istantivy::schema::TEXT
, and the options for numeric types istantivy::schema::INDEXED
.default_search_field
: Include this field in the list of default search fields.skip_indexing
: Do not index this field.
Changelog
0.6.0
- Add
serde-cbor
serialization support (thanks @minioin)
0.5.0
- Add
Deref
to inner type onDocument
- Make index writer persistent
0.4.0
- Add various builders.
- Split out
index
andtree
functionality. - Set up
search::Searcher
trait and other search helpers.
0.3.2
- Add some docs
0.3.0
- Add
pallet_macros
to derivepallet::DocumentLike
Current version: 0.6.0
License: MIT