<commit_before>
CouchDB Views
=============

This page describes the views that will be used in the CouchDB based backend of
the gpodder.net webservice.

View groups are roughly divided into those that access user-generated documents
(e.g. PodcastUserState, EpisodeUserState) and those that don't.


Categories
----------

Doc-Types: Category

Views:
* categories/by_tags
* categories/by_weight


Chapters
--------

Doc-Types: EpisodeUserState

Views:
* chapters/by_episode


Episode Actions
---------------

Doc-Types: EpisodeUserState

Views:
* episode_actions/by_device
* episode_actions/by_podcast
* episode_actions/by_podcast_device
* episode_actions/by_user


Episodes
--------

Doc-Types: Episode

Views:
* episodes/by_id
* episodes/by_oldid
* episodes/by_podcast
* episodes/by_podcast_url
* episodes/by_slug
* episodes/need_update


Favorites
---------
Doc-Types: EpisodeUserState

Views:
* episodes/favorites_by_user


Episode States
--------------

Doc-Types: EpisodeUserState

Views:
* episode_states/by_podcast_episode
* episode_states/by_ref_urls
* episode_states/by_user_episode
* episode_states/by_user_podcast


Heatmap
-------

Doc-Types: EpisodeUserState

Views:
* heatmap/by_episode


History
-------

Doc-Types: EpisodeUserState, PodcastUserState

Views:
* history/by_device
* history/by_user


Listeners
---------

Doc-Types: EpisodeUserState

Views:
* listeners/by_episode
* listeners/by_podcast
* listeners/by_podcast_episode


Podcast Lists
-------------

Doc-Types: PodcastList

Views:
* podcastlists/by_rating
* podcastlists/by_user_slug


Podcasts
--------

Doc-Types: Podcast, PodcastGroup

Views:
* podcasts/by_id
* podcasts/by_language
* podcasts/by_last_update
* podcasts/by_oldid
* podcasts/by_slug
* podcasts/by_tag
* podcasts/by_url
* podcasts/groups_by_oldid
* podcasts/podcasts_groups
* podcasts/subscriber_data


Podcast States
--------------

Doc-Types: PodcastUserState

Views:
* podcast_states/by_device


Sanitizing Rules
----------------

Doc-Types: SanitizingRule

Views:
* sanitizing_rules/by_slug
* sanitizing_rules/by_target


Slugs
-----

Doc-Types: Podcast, PodcastGroup, Episode

Views:
* slugs/missing



Subscriptions
-------------

Doc-Types: PodcastUserState

Views:
* subscriptions/by_device
* subscriptions/by_podcast
* subscriptions/by_user


Suggestions
-----------

Doc-Types: Suggestions

Views:
* suggestions/by_user


Tags
----

Doc-Types: Podcast, PodcastGroup

Views:
* tags/by_podcast
* tags/by_user


User-Tags
---------

Doc-Types: PodcastUserState
* usertags/by_podcast
* usertags/podcasts


Toplists
--------

Doc-Types: Episode, Podcast, PodcastGroup

Views:
* toplist/episodes
* toplist/podcasts


Users
-----

Doc-Types: User

Views:
* users/deleted<commit_msg>update list of CouchDB views in doc<commit_after>
CouchDB Views
=============

This page describes the views that will be used in the CouchDB based backend of
the gpodder.net webservice.


Categories
----------

Doc-Types: Category

**Views**

* categories/by_tags
* categories/by_update


Chapters
--------

Doc-Types: EpisodeUserState

**Views**

* chapters/by_episode


Clients
-------

Doc-Types: User

**Views**

* clients/by_ua_string


Episode Actions
---------------

Doc-Types: EpisodeUserState

**Views**

* episode_actions/by_device
* episode_actions/by_podcast_device
* episode_actions/by_podcast
* episode_actions/by_user


Episode States
--------------

Doc-Types: EpisodeUserState

**Views**

* episode_states/by_podcast_episode
* episode_states/by_ref_urls
* episode_states/by_user_episode
* episode_states/by_user_podcast


Episode Statistics
------------------

Doc-Types: Episode

**Views**

* episode_stats/filetypes


Episodes
--------

Doc-Types: Episode

**Views**

* episodes/by_id
* episodes/by_oldid
* episodes/by_podcast
* episodes/by_podcast_url
* episodes/by_slug
* episodes/need_update


Favorites
---------
Doc-Types: EpisodeUserState

**Views**

* episodes/favorites_by_user


Heatmap
-------

Doc-Types: EpisodeUserState

**Views**

* heatmap/by_episode


History
-------

Doc-Types: EpisodeUserState, PodcastUserState

**Views**

* history/by_device
* history/by_user


Listeners
---------

Doc-Types: EpisodeUserState

**Views**

* listeners/by_episode
* listeners/by_podcast_episode
* listeners/by_podcast
* listeners/by_user
* listeners/by_user_podcast
* listeners/times_played_by_user


Podcast Lists
-------------

Doc-Types: PodcastList

**Views**

* podcastlists/by_rating
* podcastlists/by_user_slug
* podcastlists/random


Podcast States
--------------

Doc-Types: PodcastUserState

**Views**

* podcast_states/by_device
* podcast_states/by_podcast
* podcast_states/by_user


Podcasts
--------

Doc-Types: Podcast, PodcastGroup, PodcastSubscriberData

**Views**

* podcasts/by_id
* podcasts/by_language
* podcasts/by_last_update
* podcasts/by_oldid
* podcasts/by_slug
* podcasts/by_tag
* podcasts/by_url
* podcasts/flattr
* podcasts/groups_by_oldid
* podcasts/podcasts_groups
* podcasts/random
* podcasts/subscriber_data


Sanitizing Rules
----------------

Doc-Types: SanitizingRule

**Views**

* sanitizing_rules/by_slug
* sanitizing_rules/by_target


Slugs
-----

Doc-Types: Podcast, PodcastGroup, Episode

**Views**

* slugs/missing


Subscribers
-----------

Doc-Types: PodcastUserState

**Views**

* subscribers/by_podcast


Subscriptions
-------------

Doc-Types: PodcastUserState

**Views**

* subscriptions/by_device
* subscriptions/by_podcast
* subscriptions/by_user


Suggestions
-----------

Doc-Types: Suggestions

**Views**

* suggestions/by_user


Tags
----

Doc-Types: Podcast, PodcastGroup

**Views**

* tags/by_podcast
* tags/by_user


Toplists
--------

Doc-Types: Episode, Podcast, PodcastGroup

**Views**

* toplist/episodes
* toplist/podcasts


Trending
--------

Doc-Types: Podcast, PodcastGroup

**Views**

* trending/podcasts


Users
-----

Doc-Types: User

**Views**

* users/by_google_email
* users/deleted


User-Tags
---------

Doc-Types: PodcastUserState

* usertags/by_podcast
* usertags/podcasts
{'fraction_non_alphanumeric': 0.1534488503832056, 'fraction_numerical': 0.0, 'mean_word_length': 3.476510067114094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 29, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2940829', 'n_tokens_mistral': 2150, 'n_tokens_neox': 2073, 'n_words': 381}