From: mfandre (@mfandre) <noreply+mfandre@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #641: Cant use DISTINCT ON
Date: Sun, 11 Aug 2024 02:01:04 +0000
Message-ID: <gh-pgvector-pgvector-641@github.com> (raw)
Always receive the follow error: _SQL Error [42P10]: ERROR: SELECT DISTINCT ON expressions must match initial ORDER BY expressions_
```
SELECT distinct on (embedding, path) path
FROM chunks
ORDER BY embedding <=> '[0.00581426,-0.0013586936,0.009351607,-0.0007560063,...]',path
LIMIT 3
```
<img width="874" alt="image" src="https://github.com/user-attachments/assets/fcd3c8ae-a42f-4603-8108-561a1098b1b7";