Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Integrate color-based search #115

Closed
4 of 6 tasks
iolyd opened this issue Dec 5, 2022 · 2 comments
Closed
4 of 6 tasks

Task: Integrate color-based search #115

iolyd opened this issue Dec 5, 2022 · 2 comments
Assignees

Comments

@iolyd
Copy link
Member

iolyd commented Dec 5, 2022

Task Description

For greater appeal to lay people and to put forth the visual dimension of design, a color-based search or filtering functionality here is relevant. As much as possible, we should try to leverage postgres to handle storing the color values and assessing the proximity of various values.

Resources

List of actions

  • Pre-requisites:
    • Complete image upload implementation
    • Add dominant color(s) extraction during server-side processing on upload
  • Identify approach for postgres color proximity evaluation
  • Implement color-based search
    • Evaluate if can be chainable with other supabase-js filtering methods
@iolyd
Copy link
Member Author

iolyd commented Dec 7, 2022

The adopted approach for storing color values is to use postgres's cube extension, storing colors as point-cubes aka cubes of size 0 (https://www.postgresql.org/docs/current/cube.html). This is simplifies to storing colors as 3d vectors (r, g, b) and enables proximity search using euclidian distance computation, with the <-> operator.

Next step is to determine how color-based search queries can be executed. Are rpc calls unavoidable? If so, how can they chain with other filter params?

@iolyd iolyd changed the title Task: Color-based search Task: Add color-based search Apr 3, 2024
@iolyd iolyd changed the title Task: Add color-based search Task: Integrate color-based search Apr 3, 2024
@iolyd
Copy link
Member Author

iolyd commented Apr 3, 2024

Technical challenges are essentially solved through our migration to drizzle-orm and the publication of drizzle-orm-helpers including the cube custom type driver and cube-related operations.

@iolyd iolyd closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant