pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #801: Sparsevec indexing issue
3+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] issue #801: Sparsevec indexing issue
@ 2025-03-18 16:05  "amelboc (@amelboc)" <noreply+amelboc@github.com>
  0 siblings, 0 replies; 3+ messages in thread

From: amelboc (@amelboc) @ 2025-03-18 16:05 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

I've ran into an issue in regards to the indexing of sparsevec. I understand the format of a sparsevec is this: {index1:value1,index2:value2}/dimensions where dimensions is max 1000 (max amount of non-zero elements) but you could have up to 16000 zero elements for a sparsevec. If the index is based off of a vocabulary dictionary I have with over 1000 elements, there seems to be a problem when I try to create a sparse vector: if one index in the sparsevec is higher than the dimensions value, postgres deems the sparse vector invalid. Can the index in sparsevec not be larger than the max dimension? And why not if it can have up to 16,000 non-zero elements?

^ permalink  raw  [nested|flat] 3+ messages in thread

* Re: [pgvector/pgvector] issue #801: Sparsevec indexing issue
@ 2025-03-18 16:18  "ankane (@ankane)" <noreply+ankane@github.com>
  1 sibling, 0 replies; 3+ messages in thread

From: ankane (@ankane) @ 2025-03-18 16:18 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @amelboc, 1,000 is roughly the max number of non-zero elements that will fit on a 8 KB page (#461). Feel free to add more details about your specific use case to #749.

^ permalink  raw  [nested|flat] 3+ messages in thread

* Re: [pgvector/pgvector] issue #801: Sparsevec indexing issue
@ 2025-03-18 16:18  "ankane (@ankane)" <noreply+ankane@github.com>
  1 sibling, 0 replies; 3+ messages in thread

From: ankane (@ankane) @ 2025-03-18 16:18 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-03-18 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-03-18 16:05 [pgvector/pgvector] issue #801: Sparsevec indexing issue "amelboc (@amelboc)" <noreply+amelboc@github.com>
2025-03-18 16:18 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-03-18 16:18 ` "ankane (@ankane)" <noreply+ankane@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