# Msearch Java Elasticsearch 8.9

**URL:** <https://discuss.elastic.co/t/msearch-java-elasticsearch-8-9/343570>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [September 21, 2023, 6:04pm UTC](https://discuss.elastic.co/t/msearch-java-elasticsearch-8-9/343570 "2023-09-21T18:04:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfuehner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jfuehner/32/125907_2.png) [@jfuehner](https://discuss.elastic.co/u/jfuehner)\
**Post date:** [September 21, 2023, 6:04pm UTC](https://discuss.elastic.co/t/msearch-java-elasticsearch-8-9/343570/1 "2023-09-21T18:04:42Z")

</div>

I am trying to use the Java 8.9 client to send multi-search requests ([Multi search API | Elasticsearch Guide [8.10] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html)) but am getting a NullPointerException when waiting for the results to come back…

Is there a limit to the number of requests I can send? I am attempting to send ~500 in one search.

Each request is sending a Boolean query within an index within a specified date range and is either a query string query or a geospatial distance query.

I was able to get results back with a single request sent via the multi-search API call… Albeit the results were empty as nothing was found.

I also am able to get results back from the same queries using the single-search/non-multi-search API.

Was hoping to be able to use the multi-search for these larger requests.

Any thoughts/help would be great!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 19, 2023, 6:05pm UTC](https://discuss.elastic.co/t/msearch-java-elasticsearch-8-9/343570/2 "2023-10-19T18:05:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
