# Subject: Unable to Modify Default Query Limits in Weaviate Deployment. Retreving only 100 results

**URL:** https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576
**Category:** Support
**Created:** [February 26, 2024, 4:11pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576 "2024-02-26T16:11:30Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Sandip](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@Sandip](https://forum.weaviate.io/u/Sandip)
#### Post date: [February 26, 2024, 4:11pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/1 "2024-02-26T16:11:30Z")

</div>

I am facing an issue with my Weaviate deployment where I am unable to change the default query limits for search results. Despite adjusting both the QUERY\_DEFAULTS\_LIMIT and QUERY\_MAXIMUM\_RESULTS parameters in my configuration, as well as trying different values and even omitting them entirely, the number of search results returned by Weaviate remains fixed at 100.

Below is the relevant excerpt from my Weaviate configuration:

```auto
---
version: '3.4'
services:
  weaviate:
    command:
      - --host
      - 0.0.0.0
      - --port
      - '1000'
      - --scheme
      - http
    image: semitechnologies/weaviate:1.22.0
    ports:
      - "1000:1000"
    restart: on-failure:0
    volumes:
      - C:/backups:/tmp/backups
    environment:
      QUERY_DEFAULTS_LIMIT: 10000
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      DEFAULT_VECTORIZER_MODULE: 'none'
      ENABLE_MODULES: 'backup-filesystem,backup-s3'
      AWS_ACCESS_KEY_ID: ''
      AWS_SECRET_ACCESS_KEY: ''
      AWS_SESSION_TOKEN: ''
      AWS_REGION: 'us-east-1'
      BACKUP_S3_BUCKET: 'bucket-dev'
      BACKUP_S3_PATH: 'weaviate/backups/'
      BACKUP_S3_ENDPOINT: ''
      BACKUP_FILESYSTEM_PATH: '/tmp/backups'
      CLUSTER_HOSTNAME: 'node1'
      QUERY_MAXIMUM_RESULTS: 10000
      DISK_USE_READONLY_PERCENTAGE: 100
---

```

I would greatly appreciate any insights or suggestions on how to resolve this issue and successfully adjust the default query limits in Weaviate.

Thank you in advance for your assistance.

---

<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: [February 27, 2024, 1:23pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/2 "2024-02-27T13:23:18Z")

</div>

Hi @Sandip !

I was not able to reproduce part of this.

setting `QUERY_MAXIMUM_RESULTS` to 5, and adding 10000 objects:

```auto
import weaviate
client = weaviate.connect_to_local()

from weaviate import classes as wvc

collection = client.collections.create(
    name="TestQueryLimit",
    vectorizer_config=None,
    properties=[
        wvc.config.Property(name="text", data_type=wvc.config.DataType.TEXT)
    ]
)

from weaviate.util import generate_uuid5
objects = []
for i in range(10000):
    objects.append(
        wvc.data.DataObject(
            {"text": f"Object {i}"},
            uuid=generate_uuid5(f"item-{i}")
        )
    )

collection.data.insert_many(objects)

```

Now, whenever I query:

```auto
collection.query.bm25(query="Object", limit=3000)

```

I get the following error:

> WeaviateQueryError: Query call with protocol GRPC search failed with message explorer: get class: vector search: invalid pagination params: query maximum results exceeded.

This is expected.

However, for `QUERY_DEFAULTS_LIMIT` I tried setting it to 25, and when performing a query using bm25, for example:

```auto
len(collection.query.bm25(query="Object", limit=None).objects)

```

it indeed didn’t respect that limit from server, and was only **returning 10 objects by default**.

the same happens for this query:

```auto
len(collection.query.fetch_objects().objects)

```

I will need to ask this internally and will get back here when I get an answer.

Thanks for reporting!

---

<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: [February 28, 2024, 8:24pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/3 "2024-02-28T20:24:30Z")

</div>

Hi @Sandip !

I found out that that limit, `QUERY_DEFAULTS_LIMIT` will only take effect at the rest endpoint, so:

[http://localhost:8080/v1/objects](http://localhost:8080/v1/objects)

I understand that from a user perspective, setting that limit should take effect in all queries: rest, grpc and graphql.

I have raised that internally.

Thanks!

---

<div class="post-metadata">

### Author: ![GameSetAndMatch](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/gamesetandmatch/32/976_2.png) [@GameSetAndMatch](https://forum.weaviate.io/u/GameSetAndMatch)
#### Post date: [February 29, 2024, 3:58pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/4 "2024-02-29T15:58:31Z")

</div>

Hello!

Thank you for raising that problem internally, I am facing the same issue.

On the other hand, I was wondering if it would be possible to pass filters in the [cursor api](https://weaviate.io/developers/weaviate/api/graphql/additional-operators#cursor-with-after) ?

Also, do you mind updating the [doc](https://weaviate.io/developers/weaviate/api/graphql/additional-operators#cursor-with-after:~:text=The%20number%20of%20objects%20you%20can%20retrieve%20is%20limited.): until the fix to GRPC i completed?

- **The number of objects you can retrieve is limited**. A single query returns up to `QUERY_MAXIMUM_RESULTS`. If the sum of `offset` and `limit` exceeds `QUERY_MAXIMUM_RESULTS`, Weaviate returns an error. To change the limit, edit the `QUERY_MAXIMUM_RESULTS` environment variable. If you increase `QUERY_MAXIMUM_RESULTS`, use the lowest value possible to avoid performance problems.

Thank you!

---

<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: [March 1, 2024, 12:43pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/5 "2024-03-01T12:43:47Z")

</div>

Thanks for spotting this.

**Note:** Our team is working on clients so all queries get persistent with `QUERY_DEFAULTS_LIMIT` in server.

A fix should come soon 🤩

---

<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: [March 1, 2024, 12:51pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/6 "2024-03-01T12:51:03Z")

</div>

Hi! You cannot pass filter to the cursor api. as it will iterate over all objects.

If you want iterate over filtered objects, you will need to do a search:

> **[Basic search examples | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/search/basics)**
>
> With Weaviate you can query your data using vector similarity search, keyword search, or a mix of both with hybrid search. You can control what object properties and metadata to return.

The issue is not in GRPC nor Weaviate, but in the client that will be fixed soon.

What exactly would need changing on the doc? 🤔

---

<div class="post-metadata">

### Author: ![vkrasnoselskikh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/vkrasnoselskikh/32/7227_2.png) [@vkrasnoselskikh](https://forum.weaviate.io/u/vkrasnoselskikh)
#### Post date: [July 15, 2025, 5:24am UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/7 "2025-07-15T05:24:09Z")

</div>

Hi, thanks for your answer!

What to do - if I need to go through the whole collection (more than 5 million objects) and filter by property (e.g. document type=‘pdf’) to process them?

If you use filter search - then limit + offset should be less than QUERY\_MAXIMUM\_RESULTS (which is 10\_000 by default).

Should ‘QUERY\_MAXIMUM\_RESULTS’ be equal to the number of data in the database?

---

<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: [August 4, 2025, 10:32am UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/8 "2025-08-04T10:32:42Z")

</div>

hi @vkrasnoselskikh !!

For now there isn’t a filter for all objects

And probably, if you want to get that, you will also need to increase `GRPC_MAX_MESSAGE_SIZE` at [environment variable](https://docs.weaviate.io/deploy/configuration/env-vars), as if not using pagination, you can reach that limit too 😬

Let me know if this helps

---

<div class="post-metadata">

### Author: ![vkrasnoselskikh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/vkrasnoselskikh/32/7227_2.png) [@vkrasnoselskikh](https://forum.weaviate.io/u/vkrasnoselskikh)
#### Post date: [August 15, 2025, 10:10am UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/9 "2025-08-15T10:10:07Z")

</div>

Thank you for you answer @DudaNogueira !!

Since I use pagination (limit/offset), I don’t encounter GRPC\_MAX\_MESSAGE\_SIZE.

But as soon asthe sum of limit + offset approaches 10\_000 ( I didn’t change default QUERY\_MAXIMUM\_RESULTS), I get an error:

```auto
weaviate.exceptions.WeaviateQueryError: Query call with protocol GRPC search failed with message <AioRpcError of RPC that terminated with:
	status = StatusCode.UNKNOWN
	details = "explorer: list class: search: invalid pagination params: query maximum results exceeded"
	debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"explorer: list class: search: invalid pagination params: query maximum results exceeded", grpc_status:2, created_time:"2025-08-15T14:02:22.05397+04:00"}"
>.

```

My code:

```auto
Document = client.collections.get('Document').with_tenant(tenant)

req = Document.query.fetch_objects(
    limit=10,
    offset=10_000,
    return_properties=['document_type'],
)

for _obj in req.objects: # raise weaviate.exceptions.WeaviateQueryError
    print(_obj.uuid)

```

Where can I vote for the functionality: add to cursor\_api or somewhere else the ability to bypass the collection with a simple (Equal) filter?

Or do I need to contribute this?

---

<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: [August 17, 2025, 8:44pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/10 "2025-08-17T20:44:34Z")

</div>

hi @vkrasnoselskikh !!

I believe it is best to create a new forum thread (or GH issue), stating the problem, a minimum reproducible code, the version you can reproduce, etc. And once we have this in place, request a feature.

Not sure I understood the feature request 🤔

Do you want to add a filter to [Read All Objects](https://docs.weaviate.io/weaviate/manage-objects/read-all-objects)?

Thanks!

---

<div class="post-metadata">

### Author: ![vkrasnoselskikh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/vkrasnoselskikh/32/7227_2.png) [@vkrasnoselskikh](https://forum.weaviate.io/u/vkrasnoselskikh)
#### Post date: [August 20, 2025, 8:07am UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/11 "2025-08-20T08:07:00Z")

</div>

> [@DudaNogueira](#):
>
> Do you want to add a filter to [Read All Objects](https://docs.weaviate.io/weaviate/manage-objects/read-all-objects)?

Yes, I think this will be the most expected (understandable) place for other users.

---

<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: [August 21, 2025, 2:58pm UTC](https://forum.weaviate.io/t/subject-unable-to-modify-default-query-limits-in-weaviate-deployment-retreving-only-100-results/1576/12 "2025-08-21T14:58:20Z")

</div>

Oh! Great timing 🙂

PR implementing this on Server: [https://github.com/weaviate/weaviate/pull/8961](https://github.com/weaviate/weaviate/pull/8961)

> <https://github.com/weaviate/weaviate-python-client/pull/1798>

And here implementing on client, with some tests showing how to use it: [Filter iterator by dirkkul · Pull Request #1798 · weaviate/weaviate-python-client · GitHub](https://github.com/weaviate/weaviate-python-client/pull/1798)

Hopefully this will bubble up on a next patch release!

Thanks!
