tantivy
tantivy copied to clipboard
Document as trait
Currently the layout and it's behaviour (serialization etc.) for Document is provided by tantivy.
Users of tantivy have to convert their structure into the tantivy Document.
An alternative approach would be to accept Document as a trait and let tantivy work with Documents via its trait methods.
So instead of converting into Document the user could just implement the Document trait on its structure and also potentially customize serialization into the doc store.
That's an interesting idea.