Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Inactive
Updated 3 months ago
0
Follow
Hi,
Hi,
Inactive
0
Follow
b
bu__saud
6 months ago
Β·
Hi,
Is there a way to get Qdrant IDs of the chunks I insert into it using my_index = VectorStoreIndex(...)
my_index.insert(my_nodes)?
b
L
9 comments
Share
Open in Discord
b
bu__saud
6 months ago
I guess this needs to return the new_ids. I am willing to create a PR for it if there is currently noway to get the ids.
https://docs.llamaindex.ai/en/stable/api_reference/indices/vector/?h=vectorstoreindex#llama_index.core.indices.VectorStoreIndex
Attachment
b
bu__saud
6 months ago
I am think about something like this:
def ...():
nodes_with_ids: Sequence[BaseNode] = []
for ...:
nodes_batch_with_ids = zip(nodes_bactch, new_ids)
...
nodes_with_ids.extends(nodes_batch_with_ids)
and then return nodes_with_ids
Not sure how to test this though
L
Logan M
6 months ago
the ids should be the same as the node ids no?
b
bu__saud
6 months ago
I guess so, I am looking for the node ids in the Qdrant so I can track and delete them later.
The inser_nodes() doesn't return the idea though
b
bu__saud
6 months ago
Is there a way currently to get the nodes ids after I insert?
L
Logan M
6 months ago
you have them before you insert though?
Plain Text
Copy
node_ids = [node.id_ for node in nodes] index.insert_nodes(nodes)
b
bu__saud
6 months ago
Oh really! I didn't know that!
I digged down but didn't dig up π
I will check today and confirm
b
bu__saud
6 months ago
Confirmed thanks
b
bu__saud
6 months ago
For some reason I thought these ids are generated by Qdrant
Add a reply
Sign up and join the conversation on Discord
Join on Discord