Quantcast
Channel: Weaviate Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 3588

Bug in object replace

$
0
0

hi @asido !!

Welcome to our community :hugs:

I was not able to reproduce this.

Here the code a crafted:

import weaviate
from weaviate.util import generate_uuid5
from weaviate import classes as wvc

client = weaviate.connect_to_local()

client.collections.delete("Test")
collection = client.collections.create(
    "Test",
    properties=[
        wvc.config.Property(name="vectorized", data_type=wvc.config.DataType.TEXT, skip_vectorization=False),
        wvc.config.Property(name="non_vectorized", data_type=wvc.config.DataType.TEXT, skip_vectorization=True)
    ]
)

# now we insert an object
collection.data.insert({"vectorized": "this should be vectorized", "non_vectorized": "this should not be vectorized"}, uuid=generate_uuid5("example1"))

# now we replace the object
collection.data.replace(properties={"non_vectorized": "changing here"}, uuid=generate_uuid5("example1"))

# now we get the object
collection.query.fetch_objects().objects[0].properties

#outputs
#{'vectorized': None, 'non_vectorized': 'changing here'}

Please, let me know if this code is close to what you have crafted, or let me know how to reproduce this issue.

Thanks!


Viewing all articles
Browse latest Browse all 3588

Trending Articles