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.
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')
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')