# Weaviate schema for filter operation

**URL:** <https://forum.weaviate.io/t/weaviate-schema-for-filter-operation/21934>\
**Category:** Support\
**Created:** [September 3, 2025, 4:44pm UTC](https://forum.weaviate.io/t/weaviate-schema-for-filter-operation/21934 "2025-09-03T16:44:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohini\_vaidya](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/rohini_vaidya/32/3290_2.png) [@Rohini\_vaidya](https://forum.weaviate.io/u/Rohini_vaidya)\
**Post date:** [September 3, 2025, 4:44pm UTC](https://forum.weaviate.io/t/weaviate-schema-for-filter-operation/21934/1 "2025-09-03T16:44:03Z")

</div>

Hi team,

I am working on **Weaviate hybrid search with filters** and I want to match **numeric values in queries with ingested data**.

### Example 1

- Data: `"The price of the apple is 80."`

- Query: `"Show me items with price less than 90."`

- Filter: `Filter.by_property("price").less_than(90)`

- ✅ I correctly get this record in the response.

### Example 2

- Data: `"The price of the banana is between 50 and 80."`

- ❓ Now, I’m unsure how to store this information in the `price` field.

**Question:** How should I ingest data in such cases where the property represents a range (e.g., 50–80), so that I can still apply filters effectively?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [September 3, 2025, 7:29pm UTC](https://forum.weaviate.io/t/weaviate-schema-for-filter-operation/21934/2 "2025-09-03T19:29:31Z")

</div>

> [@Rohini\_vaidya](#):
>
> Filter.by\_property(“price”).less\_than(90)

hi @Rohini_vaidya !!

You can [filter with multi conditions](https://docs.weaviate.io/weaviate/search/filters#filter-with-multiple-conditions). For example:

```python
from weaviate.classes.query import Filter
response = collection.query.fetch_objects(
    # Use & as AND
    # | as OR
    filters=(
        Filter.by_property("price").greater_or_equal(50) &
        Filter.by_property("price").less_or_equal(80)
    ),
    limit=3
)

```

Is this what you are looking for?

THanks!

---

<div class="post-metadata">

**Author:** ![Rohini\_vaidya](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/rohini_vaidya/32/3290_2.png) [@Rohini\_vaidya](https://forum.weaviate.io/u/Rohini_vaidya)\
**Post date:** [September 4, 2025, 3:47am UTC](https://forum.weaviate.io/t/weaviate-schema-for-filter-operation/21934/3 "2025-09-04T03:47:08Z")

</div>

Hi @DudaNogueira ,  
filters=( Filter.by\_property(“price”).greater\_or\_equal(50) & Filter.by\_property(“price”).less\_or\_equal(80) )  
We can do it at query time.

However, I am now extracting the numbers from my data and ingesting them into a numerical field.  
Now, for the record, “The price of the banana is between 50 and 80.”  
The numbers extracted will be an array. In this case, how can I ingest it into a number field?  
To apply the comparison filter, the data type must be int, not number\_array.

so, my question is while ingesting data into weaviate how to store array of numbers ?

---

<div class="post-metadata">

**Author:** ![Chaitanya\_Kulthe](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/chaitanya_kulthe/32/7546_2.png) [@Chaitanya\_Kulthe](https://forum.weaviate.io/u/Chaitanya_Kulthe)\
**Post date:** [September 8, 2025, 9:17pm UTC](https://forum.weaviate.io/t/weaviate-schema-for-filter-operation/21934/4 "2025-09-08T21:17:46Z")

</div>

Hey @Rohini_vaidya

The trick here is to treat a range as **two numbers instead of one**. If you try to stuff `[50, 80]` into a single field, Weaviate won’t know how to run `<` or `>` on it. But if you split it into `price_min` and `price_max`, you can keep using all the normal comparison operators without any weird workarounds.

### Example schema

```auto
{
  "properties": [
    { "name": "price_min", "dataType": ["number"] },
    { "name": "price_max", "dataType": ["number"] }
  ]
}

```

### How you’d store data

- “The apple is **80**.” =\> `price_min = 80`, `price_max = 80`

- “Banana is **between 50 and 80**.” =\> `price_min = 50`, `price_max = 80`

(If there’s only one number, just set both fields the same.)

### How you’d query

```auto
# less than 90
Filter.by_property("price_max").less_than(90)

# between 50 and 80
Filter.by_property("price_min").greater_or_equal(50) &
Filter.by_property("price_max").less_or_equal(80)

```

This way:

- You get clean numeric filters that just work.

- No headaches with arrays.

- Works for all kinds of ranges prices, dates, weights, etc.

Super simple pattern, but it keeps your hybrid search + filtering fast and predictable 🚀
