Anyone used many WHERE filters in deleteMany function via typescript v3

Description

I know in python v4 version we can do it like this:

collection.data.delete_many(
    where=(
        wvc.query.Filter.by_property("document_name").equal("my_document") &
        wvc.query.Filter.by_property("document_type").equal("xml") &
        wvc.query.Filter.by_property("source").equal("source1")
    )
)

but how to do the same things in typescript v3 version?

Server Setup Information

  • Weaviate Server Version:
  • Deployment Method:
  • Multi Node? Number of Running Nodes:
  • Client Language and Version:
  • Multitenancy?:

Any additional Information

hi @alisha_liu !!

This is how you can filter with multiple conditions in our typescript client

So the syntax for deleteMany is similar, you can just pass a Filters.and, like so:

    // delete many with multiple conditions
    const query =  await collection.data.deleteMany(
        Filters.and(
            collection.filter.byProperty('category').equal('places'),
            collection.filter.byProperty('answer').equal('Brazil')
          )
    )

Let me know if that helps!

Thanks!

2 Likes