# Filtering By Length issues

**URL:** <https://forum.weaviate.io/t/filtering-by-length-issues/490>\
**Category:** Support\
**Created:** [August 8, 2023, 12:05pm UTC](https://forum.weaviate.io/t/filtering-by-length-issues/490 "2023-08-08T12:05:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![systemz](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@systemz](https://forum.weaviate.io/u/systemz)\
**Post date:** [August 8, 2023, 12:05pm UTC](https://forum.weaviate.io/t/filtering-by-length-issues/490/1 "2023-08-08T12:05:24Z")

</div>

Hello, I am trying to use the filter by length but without success. First I have added the index to the class as follows:

```auto
'{"class": "BriefZ", "properties":[{"dataType":["string"], "name": "brief_id"}, {"dataType":["text"], "name":"brief_type"}, {"dataType":["text"], "name":"brief_name"}, {"dataType":["text"], "name":"brief_content"}], "vectorizer": "text2vec-openai", "invertedIndexConfig": {"indexPropertyLength": true}';

```

Now I am trying to query

```auto
{
  Get{
    BriefZ (
      limit: 3
      where: {
        operator: equal,
        valueInt: 0,
        path: [len("brief_content")]
      }
    ) {
      brief_name
      brief_type
    }
  }
}

```

but I get this error:

```auto
      "message": "Syntax Error GraphQL request (8:19) Unexpected (\n\n7: valueInt: 0,\n8: path: [len(\"brief_content\")]\n ^\n9: }\n",
      "path": null

```

Been trying for over an hour and so need some help please

---

<div class="post-metadata">

**Author:** ![sebawita](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/sebawita/32/5_2.png) [@sebawita](https://forum.weaviate.io/u/sebawita)\
**Post date:** [August 9, 2023, 11:14am UTC](https://forum.weaviate.io/t/filtering-by-length-issues/490/2 "2023-08-09T11:14:27Z")

</div>

Hi @systemz,  
Welcome to the community.

Can you try to update your where filter to 👇

```auto
      where: {
        operator: Equal,
        valueInt: 0,
        path: ["len(brief_content)"]
      }

```

There are two changes:

- operator =\> `Equal`
- path =\> `"len(brief_content)"`

## Follow up

Thank you for sharing this with us.

We will take it as feedback for our docs and add missing examples for the filters 👍

---

<div class="post-metadata">

**Author:** ![systemz](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@systemz](https://forum.weaviate.io/u/systemz)\
**Post date:** [August 9, 2023, 4:11pm UTC](https://forum.weaviate.io/t/filtering-by-length-issues/490/3 "2023-08-09T16:11:17Z")

</div>

@sebawita this now works - thank u

```auto
      limit: 10
      where: {
          operator: NotEqual,
          valueInt: 0,
          path : "len(brief_content)"
      }

```
