ParkGyeongTae opened a new pull request, #4933: URL: https://github.com/apache/zeppelin/pull/4933
### What is this PR for? This PR improves the robustness and clarity of the Elasticsearch interpreter module in Zeppelin. - Reimplemented `ActionResponse#getHit()` to throw `NoSuchElementException` instead of relying on unchecked access to the first hit. - Introduced a new method `getFirstHit()` which returns an `Optional<HitWrapper>` for safer optional access. - Added and refined Javadoc comments in: - `ActionResponse.java` for both `getHit()` and `getFirstHit()` - `ElasticsearchClient.java` to improve clarity on interface usage ### What type of PR is it? Documentation Refactoring ### Todos * [x] Refactor `getHit()` to throw a safe exception * [x] Add `getFirstHit()` method using `Optional` ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN/ZEPPELIN-6192 ### How should this be tested? * Build Test * Elasticsearch Interpreter Test ### Screenshots (if appropriate) ### Questions: * Does the license files need to update? No. * Is there breaking changes for older versions? No. * Does this needs documentation? No. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@zeppelin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org