pg.ddx.io pgvector/pgvector GitHub issues and pull requestshelp / color / mirror / Atom feed
[pgvector/pgvector] issue #742: Which index types are available for bit vectors? 6+ messages / 2 participants [nested] [flat]
* [pgvector/pgvector] issue #742: Which index types are available for bit vectors? @ 2024-12-29 16:21 "ivanstepanovftw (@ivanstepanovftw)" <noreply+ivanstepanovftw@github.com> 0 siblings, 0 replies; 6+ messages in thread From: ivanstepanovftw (@ivanstepanovftw) @ 2024-12-29 16:21 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Or nearest neighbors search by Hamming distance in bit vectors is implemented as brute-force? ^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #742: Which index types are available for bit vectors? @ 2024-12-29 16:22 "ivanstepanovftw (@ivanstepanovftw)" <noreply+ivanstepanovftw@github.com> 4 siblings, 0 replies; 6+ messages in thread From: ivanstepanovftw (@ivanstepanovftw) @ 2024-12-29 16:22 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @ivanstepanovftw renamed this. ^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #742: Which index types are available for bit vectors? @ 2024-12-29 16:24 "ankane (@ankane)" <noreply+ankane@github.com> 4 siblings, 0 replies; 6+ messages in thread From: ankane (@ankane) @ 2024-12-29 16:24 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Hi @ivanstepanovftw, it's in the readme. ^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #742: Which index types are available for bit vectors? @ 2024-12-29 16:24 "ankane (@ankane)" <noreply+ankane@github.com> 4 siblings, 0 replies; 6+ messages in thread From: ankane (@ankane) @ 2024-12-29 16:24 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @ankane closed this. ^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #742: Which index types are available for bit vectors? @ 2024-12-29 16:28 "ivanstepanovftw (@ivanstepanovftw)" <noreply+ivanstepanovftw@github.com> 4 siblings, 0 replies; 6+ messages in thread From: ivanstepanovftw (@ivanstepanovftw) @ 2024-12-29 16:28 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Both HNSW and IVFFlat indexes are supported for bit vectors in pgvector. That means you **can** index bit vectors (i.e. binary vectors) for fast approximate nearest neighbor searches by Hamming distance—not just brute force. For example, HNSW indexing for Hamming distance: ```sql CREATE INDEX ON items USING hnsw (embedding bit_hamming_ops); ``` and IVFFlat indexing: ```sql CREATE INDEX ON items USING ivfflat (embedding bit_hamming_ops) WITH (lists = 100); ``` You can then query using the `<~>` operator for Hamming distance: ```sql SELECT * FROM items ORDER BY embedding <~> '101' LIMIT 5; ``` ^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #742: Which index types are available for bit vectors? @ 2024-12-29 16:29 "ivanstepanovftw (@ivanstepanovftw)" <noreply+ivanstepanovftw@github.com> 4 siblings, 0 replies; 6+ messages in thread From: ivanstepanovftw (@ivanstepanovftw) @ 2024-12-29 16:29 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Thank you! ^ permalink raw [nested|flat] 6+ messages in thread
end of thread, other threads:[~2024-12-29 16:29 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-12-29 16:21 [pgvector/pgvector] issue #742: Which index types are available for bit vectors? "ivanstepanovftw (@ivanstepanovftw)" <noreply+ivanstepanovftw@github.com> 2024-12-29 16:22 ` "ivanstepanovftw (@ivanstepanovftw)" <noreply+ivanstepanovftw@github.com> 2024-12-29 16:24 ` "ankane (@ankane)" <noreply+ankane@github.com> 2024-12-29 16:24 ` "ankane (@ankane)" <noreply+ankane@github.com> 2024-12-29 16:28 ` "ivanstepanovftw (@ivanstepanovftw)" <noreply+ivanstepanovftw@github.com> 2024-12-29 16:29 ` "ivanstepanovftw (@ivanstepanovftw)" <noreply+ivanstepanovftw@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