Customize search results

Issue #254 on hold
Andrzej Ostrowski created an issue

Let's consider a package, which has been released by a user to a volatile index, and later pushed to a non-volatile index. The push operation could happen multiple times between a few indices. In the meanwhile, the package on the volatile index could have been modified.

When searching for that package, often the very first search results point to the one in the volatile index.

It would be nice if the search could be customized. If it isn't possible, perhaps packages from non-volatile indices should be displayed on the top of search results by default.

Comments (4)

  1. Florian Schulze

    I have looked into this and I'd say it is possible to create a new plugin hook which allows customizing the scoring of search results. I still have to think about a good API for it though.

    For my own small devpi server with only a few uploaded docs, the performance impact is minimal. I can't say how big the impact is with a much larger index and possibly much bigger result sets. There will be no changes to the search index schema, so one will be able to experiment with the scoring easily. A replica can use a different scoring as well for experimentation.

  2. Andrzej Ostrowski reporter

    I can do some testing, I've got >100 indices with a lot of packages with documentation. Please let know if you have a dev version with the new/customized search.

  3. Log in to comment