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

[postgres] Sort Ascending #2594

Merged
merged 2 commits into from
Dec 3, 2024
Merged

[postgres] Sort Ascending #2594

merged 2 commits into from
Dec 3, 2024

Conversation

hinthornw
Copy link
Contributor

Adds a few of preliminaries:

  1. Makes the returned "score" actually the result of the requested operation (cosine, inner_product, l2)
  2. Sorts asc, etc. so that if you were to add an HNSW index (and not have any WHERE filters), it would be used
  3. Drop the inner WHERE statement if no namespace or other filters are provided. See (2) for why.
    I don't yet add an index to the migrations since I think we need to agree on the right balance to ensure it's actually used in common query patterns.

@hinthornw hinthornw changed the title Sort Ascending [postgres] Sort Ascending Dec 2, 2024
@hinthornw hinthornw force-pushed the wfh/sort_ascending branch 2 times, most recently from 275eb4f to 68138cd Compare December 3, 2024 00:35
@hinthornw hinthornw enabled auto-merge (squash) December 3, 2024 00:46
@hinthornw hinthornw merged commit 20f091a into main Dec 3, 2024
59 checks passed
@hinthornw hinthornw deleted the wfh/sort_ascending branch December 3, 2024 01:08
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

Successfully merging this pull request may close these issues.

1 participant