Updated the getIpInfo method to fix the conditional check when evaluating the total hits from the Elasticsearch search result. Changed the condition from hits.total().value() < 0 to hits.total().value() <= 0 to correctly handle cases where no search results are found, preventing potential IndexOutOfBoundsException.
Updated the
getIpInfo
method to fix the conditional check when evaluating the total hits from the Elasticsearch search result. Changed the condition fromhits.total().value() < 0
tohits.total().value() <= 0
to correctly handle cases where no search results are found, preventing potentialIndexOutOfBoundsException
.