pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points?
Date: Mon, 20 Feb 2023 05:18:26 +0000
Message-ID: <gh-pgvector-pgvector-59-c1436346940@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-59@github.com>
References: <gh-pgvector-pgvector-59@github.com>

Hey @JDRanpariya, you can use `UNION ALL` to combine queries in Postgres.

```sql
(SELECT 1 AS query, * FROM items ORDER BY embedding <-> '[1,2,3]' LIMIT 1)
UNION ALL
(SELECT 2 AS query, * FROM items ORDER BY embedding <-> '[4,5,6]' LIMIT 1);
```

view thread (6+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-59-c1436346940@github.com>
Permalink:  ../gh-pgvector-pgvector-59-c1436346940@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox