feat(search): Faceted search based on mod host (curse/modrinth) (#48)

This also adds a commandline argument library (gumdrop) for dealing
with indices - reseting, reconfiguring, and skipping them. I don't
know which library is best for this case, but gumdrop has shorter
compile times and many fewer dependencies than clap, which is why
I chose it.
This commit is contained in:
Aeledfyr
2020-07-31 20:18:23 -05:00
committed by GitHub
parent c05ae6e94c
commit 8e798dde48
9 changed files with 147 additions and 16 deletions

View File

@@ -71,6 +71,8 @@ pub struct UploadSearchMod {
/// Unix timestamp of the last major modification
pub modified_timestamp: i64,
pub host: Cow<'static, str>,
/// Must be "{}{}{}", a hack until meilisearch supports searches
/// with empty queries (https://github.com/meilisearch/MeiliSearch/issues/729)
// This is a Cow to prevent unnecessary allocations for a static
@@ -96,6 +98,9 @@ pub struct ResultSearchMod {
/// RFC 3339 formatted modification date of the mod
pub date_modified: String,
pub latest_version: String,
/// The host of the mod: Either `modrinth` or `curseforge`
pub host: String,
}
impl Document for UploadSearchMod {