opensearch-java icon indicating copy to clipboard operation
opensearch-java copied to clipboard

Timeout Not Triggering as Expected in search Method

Open MILEWID opened this issue 2 years ago • 1 comments

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.

MILEWID avatar Oct 05 '23 22:10 MILEWID

Does your search request complete? What do you receive? Does changing it to t->t.time("10m") change anything?

dblock avatar Oct 06 '23 15:10 dblock