Comments (15)
@Seaiii could you please share your collection schema and code snippet of upsert? Also share the versions of milvus and go sdks would be helpful.
/assign @Seaiii
/unassign
from milvus.
@Seaiii could you please share your collection schema and code snippet of upsert? Also share the versions of milvus and go sdks would be helpful.
embeddings := entity.NewColumnFloatVector("embedding", 1024, [][]float32{embedding})
contents := entity.NewColumnVarChar("content", []string{action.Content})
id := entity.NewColumnInt64("id", []int64{action.Id})
_, err := MilvusClient.milvus.Upsert(context.Background(), collectionName, "", id, embeddings, contents)
embeddings are vectorised values.
content is the varchar content
id is the self-incremented primary key id
milvus version:2.4.1
milvus-sdk-go/v2 v2.4.0
![image](https://private-user-images.githubusercontent.com/29618214/339317215-6ef81cf0-a8e6-4610-a645-afb9147dfd2e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg3NTczMzMsIm5iZiI6MTcxODc1NzAzMywicGF0aCI6Ii8yOTYxODIxNC8zMzkzMTcyMTUtNmVmODFjZjAtYThlNi00NjEwLWE2NDUtYWZiOTE0N2RmZDJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE5VDAwMzAzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY5ZDg0OTg0ZGU1ZDg5YzJiNTM5NDdiN2FjNzUyNTQ0NTYzZTViYjczODEzMTQ3NDA1ZmYxNmMzN2Y3NWUwOWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.f8U2zuWA6y7FYJHFkAnAK7LOvmj-MszOLYueRyrUUwQ)
from milvus.
@Seaiii Upsert operations does not support collections with autoID enabled.
from milvus.
thought @smellthemoon is working on it
from milvus.
@Seaiii Upsert operations does not support collections with autoID enabled.
Is this one for sure? In that case I still need to maintain a self-incrementing id myself.
But the error message that milvus replied to me was not due to autoID
from milvus.
thought @smellthemoon is working on it
pr has hang for a long time. related with #30342, reviewed by @czs007 . I will fix the conflict after review.
from milvus.
Is this one for sure? In that case I still need to maintain a self-incrementing id myself.
But the error message that milvus replied to me was not due to autoID
yes, I will make the error msg more clear.
/assign
from milvus.
autoID
Ok, so when your PR is merged, autoID will be able to use upsert too right?
from milvus.
autoID
Ok, so when your PR is merged, autoID will be able to use upsert too right?
As you already set autoid for primary key, could you please share more info about why do you still need upsert to keep the same primary key? The pr will not be merged until it is determined that upsert for autoid is really meaningful to user scenarios. @Seaiii
from milvus.
autoID
We need the primary key id to self-increment to determine uniqueness. Also we need to update each piece of information. That's all.
If we don't set the primary key id to increment, we need to maintain our own
from milvus.
autoID
We need the primary key id to self-increment to determine uniqueness. Also we need to update each piece of information. That's all. If we don't set the primary key id to increment, we need to maintain our own
so in your case to keep the order of entities, you want the same primary key after doing upsert?is it acceptable for you if we set a new primary key(a new incremented or a bigger id) for the updated entity after doing upsert?
from milvus.
so in your case to keep the order of entities, you want the same primary key after doing upsert?is it acceptable for you if we set a new primary key(a new incremented or a bigger id) for the updated entity after doing upsert?
If a new primary key is added cutting larger values is not necessary.
This is because without the upsert interface, we would delete and then create for "updates". It's also a bigger primary key, and the sorting will be messed up.
The effect we want to see is that the primary key remains the same after the update.
from milvus.
okay, thank you for your feedbacks. We will rethink our design of support for upsert with autoid.
I'd close this issue as the following up support will be trakced in pr above.
from milvus.
action.Id
how did you know action.Id? did you store it some where else?
from milvus.
how did you know action.Id? did you store it some where else?
Get all the action.Id for display via the query method.
If I want to modify any of them, I do know what this action.Id is
from milvus.
Related Issues (20)
- [Bug]: cpu-e2e not work for branch 2.3 HOT 3
- [Bug]: [Nightly] Upsert same primary key in different partitions did not take effect both HOT 3
- [Bug]: Run Milvus with GPU Support Using Docker Compose,After modifying the yaml file, an error message appears: docker-compose.yml: services.standalone Additional property gpu is not allowed HOT 7
- [Bug]: Querynode memory usage is very unbalanced, some report memory quota exceeded. HOT 15
- [Bug]: Query failed: failed to query: segment lacks[segment=450413621918023414] HOT 6
- [Enhancement]: refactor data codec HOT 1
- [Bug]: txnTiKV.MultiRemove checks the wrong err
- [Bug]: filter results less than topk HOT 2
- [Enhancement]: Upgrade Cardinal version
- [Bug]: The Milvus compilation failed with a linking error HOT 1
- [Bug]: CVEs of Milvus base image HOT 3
- [Bug]: [GOSDK] Expected to return nq ResultSet when searching from an empty collection HOT 3
- [Bug]: Five out of seven flush requests 120s timeout HOT 2
- [Bug]: The results returned by the count(*) are inaccurate and keep changing HOT 6
- [Enhancement]: refactor rocksmq HOT 1
- [Enhancement]: Remove dependency on the ID allocator
- [Enhancement]: Upgrade Milvus Build Environment HOT 1
- [Feature]: Support RocketMQ Option After Streaming Service Finished HOT 7
- [Bug]: The 2.4.4 version of Minio has an issue with the infinite size of temporary files HOT 1
- [Feature]: running local milvus in singularity container or containers HOT 7
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 milvus.