opensearch-java
opensearch-java copied to clipboard
Timeout Not Triggering as Expected in search Method
What is the bug?
The timeout feature in the search method is not working as expected.
How can one reproduce the bug?
When attempting to create a timeout in my method using values like "10m" or "10ms," I do not receive a timeout error. Here's the code snippet:
SearchRequest searchRequest = new SearchRequest.Builder()
.timeout("10m")
.index(index)
.query(q -> q.bool(b -> b
.must(byTyp)
.must(byCis)
.must(bySta)))
.build();
return openSearchClient.search(searchRequest, AccountBean.class);
What is the expected behavior?
The expected behavior is to receive a timeout exception when the specified timeout duration is reached.
Does your search request complete? What do you receive? Does changing it to t->t.time("10m") change anything?