weaviate / typescript-client

Official Weaviate TypeScript Client
https://www.npmjs.com/package/weaviate-client
BSD 3-Clause "New" or "Revised" License
65 stars 23 forks source link

Unable to batch DELETE objects by id #95

Closed hymloth closed 1 year ago

hymloth commented 1 year ago

Hi there, I am trying to batch DELETE objects by id, but it fails on 1.5.0

`

await this.client.batch
    .objectsBatchDeleter()
    .withClassName('whatever')
    .withWhere({
      path: ['id'],
      operator: 'ContainsAny',
      valueTextArray:[x,y,z],
    })
    .do()

`

The error I am getting is: usage error (422): {"code":606,"message":"match.match.where.operator in body should be one of [And Or Equal Like Not NotEqual GreaterThan GreaterThanEqual LessThan LessThanEqual WithinGeoRange IsNull]"}

tsmith023 commented 1 year ago

This looks like a server error (due to the 422 report)!

Can you confirm whether you're using Weaviate 1.21.x? ContainsAny/All were introduced in that release 😁

hymloth commented 1 year ago

Hi @tsmith023, yes, that was the issue. Updated to 1.21.3 and works like a charm!