SearchResultDebug is returned by SearcherClient.executeDebug(SearchParams searchParams) and exposes the raw HTTP request URL sent during the operation. Use it to inspect query parameters, reproduce requests manually, or diagnose unexpected search results.
Method summary
| Method | Return type | Description |
|---|---|---|
getRequestUrl() | String | Returns the HTTP request URL of the last query or push operation. |
Get the request URL
Call getRequestUrl() to retrieve the exact HTTP request URL sent during the last query or push. Use this URL to inspect query parameters, reproduce the request manually, or diagnose unexpected search results.
// Execute a debug query and retrieve the request URL
SearchResultDebug debugResult = searcherClient.executeDebug(searchParams); // 1
String requestUrl = debugResult.getRequestUrl(); // 2
System.out.println(requestUrl); // 3executeDebugsends the query and returns aSearchResultDebugobject.getRequestUrl()returns the full HTTP request URL as aString.Log or inspect the URL to verify query parameters or reproduce the request.
该文章对您有帮助吗?