opensearch-project / opensearch-project/opensearch-java

Timeout Not Triggering as Expected in search Method

Open
#654 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
165
Forks
250
Avg merge
1d 18h
Merged PRs (30d)
26

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SearchRequest timeout("10m") call and the openSearchClient.search invocation shown in the report. Reproduce the behavior with the supplied timeout values, then trace how the Java client handles the timeout and identify the expected timeout exception behavior. Done means the specified timeout reliably produces the documented exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.