database: Customize rank function for the search index.
database.PackageDocument is now merged into database.Package.
database.Package now implements search.FieldLoadSaver, which can
customize the Rank method to our default sorting algorithm. This allows
faster search queries by avoiding sorting. This also eliminates the
confusion of having two similar package structs in database.
Two admin handlers are used to reindex and purge index. These handlers
are restricted to be accessible to admin only in the yaml file.
Reviewed-by: Alan Donovan <firstname.lastname@example.org>
Reviewed-by: Andrew Gerrand <email@example.com>
8 files changed