Find answers from the community

Updated 3 months ago

Hi,

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
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
image.png
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
the ids should be the same as the node ids no?
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
Is there a way currently to get the nodes ids after I insert?
you have them before you insert though?

Plain Text
node_ids = [node.id_ for node in nodes]
index.insert_nodes(nodes)
Oh really! I didn't know that!

I digged down but didn't dig up πŸ˜…

I will check today and confirm
Confirmed thanks
For some reason I thought these ids are generated by Qdrant
Add a reply
Sign up and join the conversation on Discord