def test_can_query_collection_with_complex_property_types(self, client):
        """Verifies that it is possible to query data from collections that contain complex properties (e.g. a list of nested objects in one of the properties)."""
        collection_name = "ComplexTypeInArrayTest"
        client.collections.delete(collection_name)
        collection = client.collections.create(
            name=collection_name,
            properties=[
                wvc.config.Property(
                    name="text",
                    data_type=wvc.config.DataType.TEXT,
                ),
                wvc.config.Property(
                    name="array_prop",
                    data_type=wvc.config.DataType.OBJECT_ARRAY,
                    nested_properties=[
                        wvc.config.Property(
                            name="nested_prop",
                            data_type=wvc.config.DataType.TEXT,
                        ),
                    ],
                ),
            ],
        )

        collection.data.insert(
            {
                "text": "Text of object containing complex properties",
                "array_prop": [{"nested_prop": "nested_prop content"}],
            },
            vector=[1.0, 0.0, 0.0],
        )

        vector_store = WeaviateVectorStore(
            weaviate_client=client,
            index_name=collection_name,
        )
        query = VectorStoreQuery(
            query_embedding=[1.0, 0.0, 0.0],
            similarity_top_k=2,
            query_str="world",
            mode=VectorStoreQueryMode.DEFAULT,
        )

        results = vector_store.query(query)

        assert len(results.nodes) == 1
        assert results.nodes[0].text == "Text of object containing complex properties"
Verifies that it is possible to query data from collections that contain complex properties (e.g. a list of nested objects in one of the properties).
llama-index-integrations/vector_stores/llama-index-vector-stores-weaviate/tests/test_vector_stores_weaviate.py