# How to perform a query that returns all the objects that don't have a specific value in an array property?

**URL:** <https://forum.weaviate.io/t/how-to-perform-a-query-that-returns-all-the-objects-that-dont-have-a-specific-value-in-an-array-property/345>\
**Category:** General\
**Created:** [July 10, 2023, 4:16pm UTC](https://forum.weaviate.io/t/how-to-perform-a-query-that-returns-all-the-objects-that-dont-have-a-specific-value-in-an-array-property/345 "2023-07-10T16:16:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fzaffarana](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/fzaffarana/32/267_2.png) [@fzaffarana](https://forum.weaviate.io/u/fzaffarana)\
**Post date:** [July 10, 2023, 4:16pm UTC](https://forum.weaviate.io/t/how-to-perform-a-query-that-returns-all-the-objects-that-dont-have-a-specific-value-in-an-array-property/345/1 "2023-07-10T16:16:56Z")

</div>

Hey Folks!

I have 4 objects in my schema:

1. 

```auto
{
....
keywords: ['keyword1', 'keyword2', 'keyword3']
....
}

```

1. 

```auto
{
....
keywords: ['keyword2', 'keyword3']
....
}

```

1. 

```auto
{
....
keywords: []
....
}

```

1. 

```auto
{
....
otherProperty: 'otherValue' // This object doesn't have the property 'keywords'
....
}

```

I want to perform a query that returns all the objects that don’t have the keyword ‘keyword1’ in the property ‘keywords’. I expect to get objects 2, 3, and 4.

I tried with the following query, but it doesn’t work:

```auto
{
  Get {
    Test (
      where: {
        operator: NotEqual
        path:["keywords"]
        valueText:"keyword1"
      }
    ){
      keywords
    }
  }
}

```

It just returns objects 1 and 2.

---

<div class="post-metadata">

**Author:** ![dandv](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dandv](https://forum.weaviate.io/u/dandv)\
**Post date:** [July 11, 2023, 8:54pm UTC](https://forum.weaviate.io/t/how-to-perform-a-query-that-returns-all-the-objects-that-dont-have-a-specific-value-in-an-array-property/345/2 "2023-07-11T20:54:51Z")

</div>

Hi @fzaffarana,

The problem here is actually with finding an object for which a given text element does `Not` appear in an array; returning object #4 is secondary and could be done with a nested `where` filter.

As of now, Weaviate doesn’t support finding objects in which the specified array does _not_ contain an element. Your GraphQL query arguably returns object #1 as a correct result because `keyword2` (and `keyword3`) in the array are `NotEqual` to `keyword1`.

You may want to follow this forum thread and the associated GitHub issue:

> [@\[API Feedback\] Naming for new Array filters operators](https://forum.weaviate.io/t/api-feedback-naming-for-new-array-filters-operators/203):
>
> For context, see [this post](https://github.com/weaviate/weaviate/issues/2387) and this [comment with some thoughts on naming](https://github.com/weaviate/weaviate/issues/2387#issuecomment-1476057316). Essentially we will support two new operators that work with arrays. I will describe them in high-level terms trying to avoid any naming suggestions in my description. What should those operators be called? Operator 1: Any of the items must be contained in the array Example: Object has prop languages with values ["Chinese", "French", "English"] User searches for ["French", "English"] The object is a match and is ret…
