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

Error when using buckets on vector search "Could not find a field named _vector_distance in the schema for sorting." #1731

Open
mathisobadia opened this issue May 14, 2024 · 0 comments

Comments

@mathisobadia
Copy link

Description

I am trying to use the sort_by property with the vector search and also trying to rerank the results with the bucket parameter:
sort_by: '_vector_distance(buckets: 10):desc, popularity:desc',

Steps to reproduce

make a vector search query with the sort_by set to sort_by: '_vector_distance(buckets: 10):desc',
note that it works when we havesort_by: '_vector_distance:desc', but not with sort_by: '_vector_distance(buckets: 10):desc',

Expected Behavior

Receive results reranked in the buckets similar to what is described in documentation for ranking based on popularity
Maybe this is normal that the bucket prop is not supported for vector search queries so this is a feature request and not a bug report but in that case the error message should be changed to explain that buckets are not supported for the _vector_distance field

Actual Behavior

receive the error
"Could not find a field named _vector_distance in the schema for sorting."

Metadata

Typesense Version: 25.1

OS: Typesense cloud

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

No branches or pull requests

2 participants