The SearchResultDebug class

更新时间:
复制 MD 格式

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

MethodReturn typeDescription
getRequestUrl()StringReturns 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);                  // 3
  1. executeDebug sends the query and returns a SearchResultDebug object.

  2. getRequestUrl() returns the full HTTP request URL as a String.

  3. Log or inspect the URL to verify query parameters or reproduce the request.