-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
enhancementNew feature or requestNew feature or requestfeature-parityFeature parity with upstream tantivyFeature parity with upstream tantivyhelp wantedExtra attention is neededExtra attention is needed
Description
Hi,
Is there a way to score some documents higher than others? Something like weight
in whoosh?
For example:
In an ecommerce site, we can have a popularity
field for each items. And when user searches for something, the popular documents appear on top.
This is already implemented in tantivy core repo:
https://docs.rs/tantivy/0.10.3/tantivy/collector/struct.TopDocs.html#example
I understand that bringing the callback from rust to python may make it slower. Therefore the python interface should be pretty simple. E.g. searcher.search(query, weight_by='popularity')
collinandersonpeterbe and collinanderson
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeature-parityFeature parity with upstream tantivyFeature parity with upstream tantivyhelp wantedExtra attention is neededExtra attention is needed