Stay organized with collections
Save and categorize content based on your preferences.
publicfinalclassFacetimplementsSerializable
A Facet can be used to categorize a Document. It is not a Field.
Search results can contain facets for the extended result set and their value frequency.
For example, if a search query is related to "wine", then facets could be "color" with values
of "red" and "white", and "year" with values of "2000" and "2005".
[[["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-03-21 UTC."],[[["A `Facet` is used to categorize a `Document` in search results, distinct from a `Field`, and can be used to provide a value frequency."],["Each `Facet` has a name and either an atom or a number as its value, with specific length and value limits, respectively."],["`Facet` can be created via static methods `withAtom` for atom facets or `withNumber` for number facets, requiring a name and the respective atom or number value."],["The `Facet` class provides methods to retrieve the `Facet`'s name, atomic value (`getAtom`), and numeric value (`getNumber`), and also overrides methods such as `equals`, `hashCode` and `toString` from `Object`."]]],[]]