Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Your system of indexing metadata is an antipattern #91

Closed
vporton opened this issue Jul 2, 2021 · 2 comments
Closed

Your system of indexing metadata is an antipattern #91

vporton opened this issue Jul 2, 2021 · 2 comments

Comments

@vporton
Copy link

vporton commented Jul 2, 2021

You system of creating indices for INDICES environment variable is both not enough flexible and over-complicated.

The reasonable way to store metadata is to use a composite PostgreSQL index of both name and value. For queries use JOINs.

Then no need to create a separate DB table field for each index and every index could be used for filtering/sorting.

@TheLoneRonin
Copy link
Contributor

@vporton

Hey VIctor,

First, thank you for taking the time to review everything. Appreciate you taking the time.
Second, agree it was an antipattern.

The intent was to achieve something like this: #6

This will eventually be phased out don't worry.

Thank you for mentioning it (and the other issues).

@TheLoneRonin
Copy link
Contributor

Noting that indices should be refactored as part of: #61

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants