From ac3b15b1e2edf8852eba53623dc230a19b65dcb6 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 22 Apr 2024 08:29:38 -0400 Subject: [PATCH] Add tag count fields --- lib/philomena/images/query.ex | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/philomena/images/query.ex b/lib/philomena/images/query.ex index 81551580..db00a20b 100644 --- a/lib/philomena/images/query.ex +++ b/lib/philomena/images/query.ex @@ -66,10 +66,26 @@ defmodule Philomena.Images.Query do end end + defp tag_count_fields do + [ + "body_type_tag_count", + "error_tag_count", + "character_tag_count", + "content_fanmade_tag_count", + "content_official_tag_count", + "oc_tag_count", + "origin_tag_count", + "rating_tag_count", + "species_tag_count", + "spoiler_tag_count" + ] + end + defp anonymous_fields do [ int_fields: - ~W(id width height comment_count score upvotes downvotes faves uploader_id faved_by_id tag_count pixels size), + ~W(id width height score upvotes downvotes faves uploader_id faved_by_id pixels size comment_count source_count tag_count) ++ + tag_count_fields(), float_fields: ~W(aspect_ratio wilson_score duration), date_fields: ~W(created_at updated_at first_seen_at), literal_fields: