pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: amelboc (@amelboc) <noreply+amelboc@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #801: Sparsevec indexing issue
Date: Tue, 18 Mar 2025 16:05:39 +0000
Message-ID: <gh-pgvector-pgvector-801@github.com> (raw)

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?

view thread (3+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-801@github.com>
Permalink:  ../gh-pgvector-pgvector-801@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