Creates a RequestStatus message suitable for reporting an unknown index. We use
SearchServicePb.SearchServiceError.ErrorCode#OK because the unknown index isn't
an error condition but just a notice to the user.
For a 'batch' request, determines a single status to stand for all. Code will be OK if and only
if the collection contains no non-OK statuses.
If the collection is empty, the result will be an OK status with no detail.
If the collection has one element, the result will be that element.
If the collection has multiple elements with the same error code, the result will have that
error code and the corresponding canonical code.
If there are multiple error statuses in the collection, the one with the highest numerical
code in the ErrorCode enum will be chosen as representative, and the errorDetail field of the
result will contain at least the errorDetail of that status.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eRequestStatusUtil\u003c/code\u003e is a utility class for managing \u003ccode\u003eSearchServicePb.RequestStatus\u003c/code\u003e objects within the Search Service.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides methods to create various \u003ccode\u003eRequestStatus\u003c/code\u003e messages, including those indicating invalid requests, specific error codes, or unknown indexes.\u003c/p\u003e\n"],["\u003cp\u003eIt allows for the creation of a \u003ccode\u003eRequestStatus\u003c/code\u003e with a specified error code and message or creating a \u003ccode\u003eRequestStatus.Builder\u003c/code\u003e with an error code and message.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRequestStatusUtil\u003c/code\u003e offers a \u003ccode\u003ereduce\u003c/code\u003e method for consolidating multiple \u003ccode\u003eRequestStatus\u003c/code\u003e objects into a single representative status, particularly useful for batch requests.\u003c/p\u003e\n"],["\u003cp\u003eIt also includes a method, \u003ccode\u003etoCanonicalCode\u003c/code\u003e, for converting \u003ccode\u003eSearchServicePb.SearchServiceError.ErrorCode\u003c/code\u003e to a canonical error code.\u003c/p\u003e\n"]]],[],null,["# Class RequestStatusUtil (2.0.0)\n\n public final class RequestStatusUtil\n\nCollection of utility methods for SearchServicePb.RequestStatus. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e RequestStatusUtil \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Methods\n--------------\n\n### newInvalidRequestStatus(IllegalArgumentException e)\n\n public static SearchServicePb.RequestStatus newInvalidRequestStatus(IllegalArgumentException e)\n\nCreates a RequestStatus message suitable for reporting an invalid request.\n\n### newStatus(SearchServicePb.SearchServiceError.ErrorCode code)\n\n public static SearchServicePb.RequestStatus newStatus(SearchServicePb.SearchServiceError.ErrorCode code)\n\nCreates a SearchServicePb.RequestStatus from the given code.\n\n### newStatus(SearchServicePb.SearchServiceError.ErrorCode code, String message)\n\n public static SearchServicePb.RequestStatus newStatus(SearchServicePb.SearchServiceError.ErrorCode code, String message)\n\nCreates a SearchServicePb.RequestStatus from the given code and message.\n\n### newStatusBuilder(SearchServicePb.SearchServiceError.ErrorCode code, String message)\n\n public static SearchServicePb.RequestStatus.Builder newStatusBuilder(SearchServicePb.SearchServiceError.ErrorCode code, String message)\n\nCreates a SearchServicePb.RequestStatus.Builder from the given code and message.\n\n### newUnknownIndexStatus(SearchServicePb.IndexSpec indexSpec)\n\n public static SearchServicePb.RequestStatus newUnknownIndexStatus(SearchServicePb.IndexSpec indexSpec)\n\nCreates a RequestStatus message suitable for reporting an unknown index. We use\nSearchServicePb.SearchServiceError.ErrorCode#OK because the unknown index isn't\nan error condition but just a notice to the user.\n\n### reduce(Collection\\\u003cSearchServicePb.RequestStatus\\\u003e statuses)\n\n public static SearchServicePb.RequestStatus reduce(Collection\u003cSearchServicePb.RequestStatus\u003e statuses)\n\nFor a 'batch' request, determines a single status to stand for all. Code will be OK if and only\nif the collection contains no non-OK statuses.\n\nIf the collection is empty, the result will be an OK status with no detail.\n\nIf the collection has one element, the result will be that element.\n\nIf the collection has multiple elements with the same error code, the result will have that\nerror code and the corresponding canonical code.\n\nIf there are multiple error statuses in the collection, the one with the highest numerical\ncode in the ErrorCode enum will be chosen as representative, and the errorDetail field of the\nresult will contain at least the errorDetail of that status.\n\n### toCanonicalCode(SearchServicePb.SearchServiceError.ErrorCode appCode)\n\n public static Codes.Code toCanonicalCode(SearchServicePb.SearchServiceError.ErrorCode appCode)\n\nConverts SearchServicePb.SearchServiceError.ErrorCode to canonical error code.\n\nConstructors\n------------\n\n### RequestStatusUtil()\n\n public RequestStatusUtil()"]]