tantivy icon indicating copy to clipboard operation
tantivy copied to clipboard

Document as trait

Open PSeitz opened this issue 3 years ago • 1 comments

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.

PSeitz avatar Apr 29 '22 09:04 PSeitz

That's an interesting idea.

fulmicoton avatar May 02 '22 02:05 fulmicoton