# .like() and .contains\_any() Not Working on Vectorized fileContent Text

**URL:** <https://forum.weaviate.io/t/like-and-contains-any-not-working-on-vectorized-filecontent-text/21996>\
**Category:** General\
**Created:** [September 24, 2025, 6:03pm UTC](https://forum.weaviate.io/t/like-and-contains-any-not-working-on-vectorized-filecontent-text/21996 "2025-09-24T18:03:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muhammad\_Ashir](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/muhammad_ashir/32/2644_2.png) [@Muhammad\_Ashir](https://forum.weaviate.io/u/Muhammad_Ashir)\
**Post date:** [September 24, 2025, 6:03pm UTC](https://forum.weaviate.io/t/like-and-contains-any-not-working-on-vectorized-filecontent-text/21996/1 "2025-09-24T18:03:36Z")

</div>

Hello Weaviate Community,

I’m trying to filter my collection based on a text property `fileContent` using the Python client. I’ve tried both `.like()` and `.contains_any()`, but neither seems to work. Here are my attempts:  
\*\*  
Using .like()\*\*

condition = Filter.by\_property(“fileContent”).like(f"_{v}_") if isinstance(v, str) else None

**Using .contains\_any()**

condition = Filter.by\_property(“fileContent”).contains\_any([v]) if isinstance(v, str) else None

My schema for `fileContent` is:

```auto
{
  "dataType": ["text"],
  "indexFilterable": true,
  "indexRangeFilters": false,
  "indexSearchable": true,
  "moduleConfig": {
    "text2vec-openai": {
      "skip": false,
      "vectorizePropertyName": true
    }
  },
  "name": "fileContent",
  "tokenization": "whitespace"
}

```

Even though `indexFilterable: true`, both `.like()` and `.contains_any()` return no results.

I suspect this is because `fileContent` is **vectorized with `text2vec-openai`** , so string-based search operators don’t work.

**Questions:**

1. Can `.like()` or `.contains_any()` be used on a vectorized text property?

2. If not, what’s the recommended way to perform substring search on `fileContent` without semantic search (`near_text`)?

3. Do I need to change the schema (disable vectorization) for these operators to work?

Any guidance or examples would be greatly appreciated!

Thank you!

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [September 25, 2025, 10:37am UTC](https://forum.weaviate.io/t/like-and-contains-any-not-working-on-vectorized-filecontent-text/21996/2 "2025-09-25T10:37:19Z")

</div>

Good morning,

I think the tokenization here is the key point, indeed you can use both as long as the property is indexed as filterable and searchable:

- With tokenization set to **“whitespace”** , .contains\_any() will only match exact tokens (whitespace-separated words). contains\_any() is best for matching full tokens, not substrings: [Filters | Weaviate Documentation](https://docs.weaviate.io/weaviate/search/filters#containsany-filter)

- For partial matches or substrings, use .like() with wildcards (e.g., \*substring\*). See example: [Filters | Weaviate Documentation](https://docs.weaviate.io/weaviate/search/filters#filter-text-on-partial-matches)

Best regards,

Mohamed Shahin  
Weaviate Support Engineer  
(Ireland, UTC±00:00/+01:00)
