Comments (4)
If you can create a minimal reproducible example, happy to look into it more.
CREATE TABLE vectortestingtable (id text PRIMARY KEY, data jsonb);
INSERT INTO vectortestingtable VALUES ('1', jsonb_build_object('vector','[0.0030914496, 0.024497276, 0.041943595, 0.010864009]'));
SELECT 1 - (CAST(data->>'vector' as vector) <=> '[1,2,3,4]') from vectortestingtable;
from pgvector.
While trying to reproduce the error, I found that the issue was caused by one of the values in the vector. Removing the bad value from the vector resolved the issue.
CREATE TABLE vecorissuetable (id text PRIMARY KEY, data jsonb);
insert into vecorissuetable values ('1', jsonb_build_object('vector','[4.8886375E-k7]'));
select * from vecorissuetable;
SELECT 1 - (CAST(data->>'vector' as vector) <=> '[1]') from vecorissuetable;
drop table vecorissuetable;
from pgvector.
Hi @brgco95, it should work fine with the right parentheses.
SELECT 1 - (CAST(data->>'vector' AS vector) <=> '[1,2,3,4]') FROM vectortestingtable;
from pgvector.
@ankane
Copied your example and ran into the same issue.
from pgvector.
Related Issues (20)
- Adding data after building hnsw index is much slower HOT 4
- 【ef_search】set hnsw.ef_search = 1001 failed HOT 2
- Error building Docker image `make: /usr/bin/clang-11: No such file or directory` HOT 2
- ivfflat indexing takes 6-8x longer for halfvec than for vector HOT 6
- configuring the pgVector like an nightmare HOT 1
- Intermittent timeout on getting nearest neighbors by L2 distance HOT 1
- make 0.7.0 failed HOT 1
- Does pgvector need to be installed in the slave of the pg database in cluster mode? HOT 2
- Is Increase the concurrency of clients can accelerate the construction speed of the HNSW index on the same table. HOT 1
- What are the impacts of dimension for sparsevec? HOT 1
- Duplicate error when creating a vector index using HNSW HOT 6
- tuning the tmpCtx to improve HNSW build performance HOT 5
- Index vector_ip_ops does not work for halfvec HOT 1
- Can the "LIMIT" statement be included as one of arguments when doing scan operation? HOT 1
- SQL Error [XX000]: FATAL: failed to open bitcode file "/usr/local/lib/postgresql/bitcode/vector/src/vector.bc": No such file or directory HOT 4
- how to list existing databases in postgresql using python HOT 2
- HNSW Indexing and Filtering HOT 2
- A question about building index in background. HOT 1
- Installation instructions unclear HOT 1
- Large vector data type will cause performance decline? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgvector.