# Maximum search limit of 10000 results has been reached

**URL:** https://forum.weaviate.io/t/maximum-search-limit-of-10000-results-has-been-reached/1216
**Category:** Support
**Created:** [January 12, 2024, 9:50am UTC](https://forum.weaviate.io/t/maximum-search-limit-of-10000-results-has-been-reached/1216 "2024-01-12T09:50:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kuanlu3](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kuanlu3/32/823_2.png) [@kuanlu3](https://forum.weaviate.io/u/kuanlu3)
#### Post date: [January 12, 2024, 9:50am UTC](https://forum.weaviate.io/t/maximum-search-limit-of-10000-results-has-been-reached/1216/1 "2024-01-12T09:50:00Z")

</div>

Hi Weaviate community,  
we are using Weaviate DB as embeddings storage and performing the similarity search etc. Recently we got the following warning message from the DB  
“{“action”:“unlimited\_vector\_search”,“level”:“warning”,“msg”:“maximum search limit of 10000 results has been reached”,“time”:“2024-01-12T08:23:19Z”}.”  
Can you please let us know:  
1, what is the reason for that?  
2, what is the consequence with this message? Does that mean we are not allowed to save vectors anymore? or we have constrain to perform similarity search? If one of both is “Yes”, can you suggest us any solution on that?

best regards,

User

---

<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: [January 15, 2024, 5:58pm UTC](https://forum.weaviate.io/t/maximum-search-limit-of-10000-results-has-been-reached/1216/2 "2024-01-15T17:58:16Z")

</div>

Hi @kuanlu3 ! Welcome to our community 🤗

I believe this is a limit in which Weaviate will stop querying thru the index.

here is where this is raised in code:

> <https://github.com/weaviate/weaviate/blob/02baaef84fdcfa5f396ccdc8c0c337555cb2e91b/adapters/repos/db/vector/hnsw/search.go#L138>

So when performing searches or deletions, there are upper limits set to prevent excessive memory usage and long-running requests, which could lead to out-of-memory errors or other performance issues. For example, when deleting objects with a batch delete operation, Weaviate imposes a default limit of 10,000 objects that can be deleted in a single query to protect against unexpected memory surges.

You can still save vectors and objects, however, there is the default limit of 10000 objects to be returned. This value is set by the environment variable `QUERY_MAXIMUM_RESULTS` as listed here:

> **[Environment variables | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/config-refs/env-vars#list-of-environment-variables)**
>
> Overview

Let me know if that helps 🙂

---

<div class="post-metadata">

### Author: ![Ilan\_Manouach](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ilan_manouach/32/1059_2.png) [@Ilan\_Manouach](https://forum.weaviate.io/u/Ilan_Manouach)
#### Post date: [April 19, 2024, 2:30pm UTC](https://forum.weaviate.io/t/maximum-search-limit-of-10000-results-has-been-reached/1216/3 "2024-04-19T14:30:39Z")

</div>

Hi Duda,  
I can say that verba changed really the way I work.  
Is there any possibility to change the 10000 upper limit? We have a powerful computer and most of our documents are very short txt files. We would like to bring this up to 50000.

---

<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: [April 19, 2024, 5:49pm UTC](https://forum.weaviate.io/t/maximum-search-limit-of-10000-results-has-been-reached/1216/4 "2024-04-19T17:49:06Z")

</div>

Hi @Ilan_Manouach !! Glad to hear that!

You can increase that limit by changing the environment variable `QUERY_MAXIMUM_RESULTS ` for the Weaviate server you are running it with.

Let me know if how can help you on that.

Thanks!

---

<div class="post-metadata">

### Author: ![Ilan\_Manouach](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ilan_manouach/32/1059_2.png) [@Ilan\_Manouach](https://forum.weaviate.io/u/Ilan_Manouach)
#### Post date: [April 19, 2024, 6:40pm UTC](https://forum.weaviate.io/t/maximum-search-limit-of-10000-results-has-been-reached/1216/5 "2024-04-19T18:40:12Z")

</div>

@DudaNogueira  
Thank you for your swift answer.  
I am deploying verba localy through a docker compose file, using cohere for embeddings, and GPT4 for queries.  
Could you tell me where I am able to change the QUERY\_MAXIMUM\_RESULTS variable? I tried to add QUERY\_MAXIMUM\_RESULTS: 12000 under the QUERY\_DEFAULTS\_LIMIT: 25 on the docker-compose.yml, but it didn’t work.  
The total number of documents in the GUI is still capped at 10k.

Thanks!

---

<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: [April 26, 2024, 11:44am UTC](https://forum.weaviate.io/t/maximum-search-limit-of-10000-results-has-been-reached/1216/6 "2024-04-26T11:44:37Z")

</div>

Hi @Ilan_Manouach,

If you don’t have `QUERY_MAXIMUM_RESULTS` in your docker compose file, then you can add it the same way you have `QUERY_DEFAULTS_LIMIT: 25`

For example:

```auto
    environment:
      QUERY_DEFAULTS_LIMIT: 25
      QUERY_MAXIMUM_RESULTS: 20000

```
