Is there a way to perform conditional filter WHERE prop NOT ContainsAny (:excludedValues)?

Description

Is there a way to perform conditional filter WHERE prop NOT ContainsAny (:excludedValues)?

Any additional Information

Let’s say we have a UserProfile vector schema with a property of sourceId for each profile and I wanted to only include results where sourceId is not contains in any :excludeIds (e.g., 1,2,3,4, so on…)

I just saw this open feature request: [Feature Request] Add "Not" operator in filter to support "Not Like" etc. in Get queries · Issue #3683 · weaviate/weaviate · GitHub and sadly looks like it has no movements/updates :frowning:

Are there any possible workaround to achieve this? Thanks!

hi @junbetterway !

As per our docs:

An operator to invert a filter (e.g. Not Like ... ) is not supported in Weaviate. If you would to see such an operator to be implemented, please let us know by upvoting the issue here.

Thanks!

Thanks @DudaNogueira and yeah saw that one already and upvoted it too.

Do you know if there has been progress about it? We’re really dying to have such as we have this new feature and having this NOT *** (or invert) condition will make it more efficient.

Not necessarily a progress, but we have recently released the 1.25 version with RAFT that required a lot of effort from our team.

With that finished, I believe we’ll have more capacity to tackle those feature requests.

Also, I have seen some internal discussions on that exact subject, so hopefully we get a solution for this soon.

Thanks @DudaNogueira that’s great to hear.

1 Like