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

Support of embedding related operators in postgres #288

Open
yuhuishi-convect opened this issue Aug 25, 2023 · 0 comments
Open

Support of embedding related operators in postgres #288

yuhuishi-convect opened this issue Aug 25, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@yuhuishi-convect
Copy link
Contributor

Example:

SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;

SELECT (embedding <#> '[3,1,2]') * -1 AS inner_product FROM items;

SELECT 1 - (embedding <=> '[3,1,2]') AS cosine_similarity FROM items;

Currently if we write these queries directly, the parser will try to parse it as AST tree, which causes an error since <->, <#>, <=> are not supported operators.
Might need to add those column in the lexer, and modify renderer.

@yuhuishi-convect yuhuishi-convect added the enhancement New feature or request label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants