[[["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\u003eFacetChecker\u003c/code\u003e is a Java class designed to validate facet names and values, specifically whether they are atom strings or numbers.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides static methods like \u003ccode\u003echeckAtom\u003c/code\u003e to verify if an atom is null or within the defined length limits, and \u003ccode\u003echeckNumber\u003c/code\u003e to ensure a number falls within the acceptable range defined by \u003ccode\u003eSearchApiLimits\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eMethods such as \u003ccode\u003echeckFacetName\u003c/code\u003e are used to validate facet names, ensuring they adhere to the specified length and pattern requirements outlined in \u003ccode\u003eSearchApiLimits\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class also contains \u003ccode\u003echeckFacetValue\u003c/code\u003e and \u003ccode\u003echeckValid\u003c/code\u003e methods to validate the facet values and the whole facet respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFacetChecker\u003c/code\u003e inherits from \u003ccode\u003ejava.lang.Object\u003c/code\u003e and includes several inherited methods like \u003ccode\u003eclone()\u003c/code\u003e, \u003ccode\u003eequals()\u003c/code\u003e, and \u003ccode\u003ewait()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class FacetChecker (2.0.0)\n\n public final class FacetChecker\n\nProvides checks for Facet names and values: atom or number. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e FacetChecker \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### checkAtom(String value)\n\n public static String checkAtom(String value)\n\nChecks whether an atom is valid. An atom can be null or a string between\n1 and SearchApiLimits.MAXIMUM_ATOM_LENGTH in length, inclusive.\n\n### checkFacetName(String name)\n\n public static String checkFacetName(String name)\n\nChecks whether a facet name is valid. The facet name length must be\nbetween 1 and [SearchApiLimits#MAXIMUM_NAME_LENGTH](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MAXIMUM_NAME_LENGTH) inclusive, and it should match\n[SearchApiLimits#FIELD_NAME_PATTERN](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_FIELD_NAME_PATTERN).\n\n### checkFacetName(String name, String callerContext)\n\n public static String checkFacetName(String name, String callerContext)\n\nChecks whether a facet name is valid. The facet name length must be\nbetween 1 and [SearchApiLimits#MAXIMUM_NAME_LENGTH](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MAXIMUM_NAME_LENGTH) inclusive, and it should match\n[SearchApiLimits#FIELD_NAME_PATTERN](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_FIELD_NAME_PATTERN).\n\n### checkFacetValue(DocumentPb.FacetValue value)\n\n public static DocumentPb.FacetValue checkFacetValue(DocumentPb.FacetValue value)\n\nChecks whether a facet value is valid.\n\n### checkNumber(Double value)\n\n public static Double checkNumber(Double value)\n\nChecks whether a number is valid. A number can be null or a value between\n[SearchApiLimits#MINIMUM_NUMBER_VALUE](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MINIMUM_NUMBER_VALUE) and [SearchApiLimits#MAXIMUM_NUMBER_VALUE](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MAXIMUM_NUMBER_VALUE),\ninclusive.\n\n### checkValid(DocumentPb.Facet facet)\n\n public static DocumentPb.Facet checkValid(DocumentPb.Facet facet)"]]