Multiple vectors visualization does not work if not all named vectors presented
joein opened this issue · 0 comments
joein commented
from qdrant_client import QdrantClient, models
if __name__ == "__main__":
cl = QdrantClient()
cl.recreate_collection(
"test2",
vectors_config={
"text": models.VectorParams(size=2, distance=models.Distance.COSINE),
"image": models.VectorParams(size=3, distance=models.Distance.COSINE),
}
)
cl.upload_collection(
"test2",
vectors=[
{
"image": [0.0, 0.0, 1.0],
},
{
"text": [0.7, 1.0],
# "image": [0.0, 0.7, 0.0],
},
{
"text": [0.5, 0.5],
"image": [0.5, 0.5, 0.5],
},
{
"text": [0.0, 0.0],
"image": [0.0, 0.0, 0.0],
},
],
)
This example does not work at all:
from qdrant_client import QdrantClient, models
if __name__ == "__main__":
cl = QdrantClient()
cl.recreate_collection(
"test2",
vectors_config={
"text": models.VectorParams(size=2, distance=models.Distance.COSINE),
"image": models.VectorParams(size=3, distance=models.Distance.COSINE),
}
)
cl.upload_collection(
"test2",
vectors=[
{
"image": [0.0, 0.0, 1.0],
},
# {
# "text": [0.7, 1.0],
# # "image": [0.0, 0.7, 0.0],
# },
{
"text": [0.5, 0.5],
"image": [0.5, 0.5, 0.5],
},
{
"text": [0.0, 0.0],
"image": [0.0, 0.0, 0.0],
},
],
)
This example works for image
if there is no attempt to visualize text
. Once there is an attempt to visualize text
, it stops working at all.