Can't use filter with by_ref with aggregate with python v4 client

        text_chunk_collection.aggregate.over_all(
                    total_count=True,
                    filters=Filter.by_ref("belong_to_file_data").by_id().equal(file_data_uuid)
                )

Code like above get this error:

weaviate.exceptions.WeaviateInvalidInputError: Invalid input provided: Single target references are not supported in this version of Weaviate. Please update to >=1.23.3..

but my weaviate is 1.23.6, and if I change aggregate.over_all to query.fetch_objects then everything works fine

The error message is wrong and it is already fixed on our dev branch but I’m not sure if it is released.

You need to do

        text_chunk_collection.aggregate.over_all(
                    total_count=True,
                    filters=Filter.by_ref_multi_target("belong_to_file_data",COLLECTION_NAME).by_id().equal(file_data_uuid)
                )

Aggregate uses graphql in the background and sadly needs to have the name of the target collection

Thank you. Will try it.

Saddly I got this error instead

weaviate.exceptions.WeaviateInvalidInputError: Invalid input provided: Multi target references are not supported in this version of Weaviate. Please update to >=1.23.3..

the filter is like this

 filters=Filter.by_ref_multi_target(link_on="belong_to_file_data",target_collection="FileData").by_id().equal(file_data_uuid)

Are you on the latest version? -rc1?

client is 4.4b8
weavatie is 1.23.6

I will try 4.4rc1

is there a migrate guide for 4.4rc1?
It changed alot for these:
classes.Configure
classes.Property

There is one here:

Note that we had warnings for a few releases before removing deprecated code in the -rc releases. So you might need to scroll a few versions back.

You probably need to change

properties=[Property(...), ReferenceProperty(...), ...]

to

properties=[Property(...), ...other props...]
references=[ReferenceProperty(...), ..other refs..]

nvm I found where to look for

Finally get it to work. Thank you.