Blaze persistence and Hibernate vector/pgvector #1879
-
Hello, I would like to use Blaze persistence to do similarity search using Hibernate vector (pgvector in postgres), but for a reason i couldn't figure out, it keeps failing on doing implicit group by. Querying like this:
throws error:
Same query without l2_distance expression in orderBy, but included in select statement works. Image.embedding is defined as:
Any pointers/ideas how to get this working? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi there, Could you please try to create a reproducer for me to look into? This should just work fine. In the meantime, you can turn off implicit group by generation for the order by clause with the |
Beta Was this translation helpful? Give feedback.
-
Heya, I created a quick sample app that should exhibit that same error: There is a single test that reproduces it. |
Beta Was this translation helpful? Give feedback.
I know it's late, but I was finally able to look into your issue and figured that this is a bug in the
PaginatedCriteriaBuilder
API. I created #2074 to track this. In the meantime, you could usesetFirstResult()
/setMaxResults()
on a regularCriteriaBuilder
if you want.