Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

ElasticSearch models audio #132

Merged
merged 28 commits into from
Aug 3, 2021
Merged

ElasticSearch models audio #132

merged 28 commits into from
Aug 3, 2021

Conversation

obulat
Copy link
Contributor

@obulat obulat commented Jul 7, 2021

Fixes #129

ElasticSearch models are declared in ingestion_server/ingestion_server/elasticsearch_models.py. They are used to create the mappings from database data to ElasticSearch in ingestion_server/ingestion_server/es_mapping.py.

This PR

  • extracts common fields from the Image model to a parent Media class
  • adds an Audio model as a subclass of Media
  • replaces template string SQL queries with safe dynamically generated one
  • cleans up and refactors code in lots of places
  • adds a bunch of documentation

@dhruvkb dhruvkb self-assigned this Jul 7, 2021
@dhruvkb dhruvkb force-pushed the es_models_audio branch from 57852a1 to 441441f Compare July 8, 2021 10:17
@dhruvkb dhruvkb marked this pull request as ready for review July 15, 2021 08:16
@dhruvkb dhruvkb requested a review from a team as a code owner July 15, 2021 08:16
@dhruvkb dhruvkb requested review from zackkrida, dhruvkb and krysal and removed request for dhruvkb July 15, 2021 08:16
krysal
krysal previously approved these changes Jul 23, 2021
Copy link
Member

@krysal krysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks excellent @dhruvkb! So organized and well documented 🌟 Thanks!

ingestion_server/ingestion_server/elasticsearch_models.py Outdated Show resolved Hide resolved
zackkrida
zackkrida previously approved these changes Jul 30, 2021
Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent. so excited for this.

ingestion_server/ingestion_server/elasticsearch_models.py Outdated Show resolved Hide resolved
@dhruvkb dhruvkb dismissed stale reviews from zackkrida and krysal via 9ef51ad July 31, 2021 03:25
@dhruvkb dhruvkb requested review from dhruvkb, zackkrida and krysal and removed request for dhruvkb July 31, 2021 03:29
@dhruvkb dhruvkb merged commit 864ea38 into main Aug 3, 2021
@dhruvkb dhruvkb deleted the es_models_audio branch August 3, 2021 00:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add ElasticSearch Audio model
4 participants