Stay organized with collections
Save and categorize content based on your preferences.
publicfinalclassFacetOptions
A FacetOptions represents facet options such as the number of facets to discover
(discoveryLimit), the number of values to be included in each discovered
facet (discoveryValueLimit), and the depth of the results to check (depth).
Note that discovery is disabled when discoveryLimit is zero.
For example, to discover 10 facets with 5 values each over 1000 extended results:
[[["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-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eFacetOptions\u003c/code\u003e controls the facet discovery process, including the number of facets, values per facet, and the depth of results to check.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ediscoveryLimit\u003c/code\u003e determines the number of facets to discover, with a value of zero disabling facet discovery.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ediscoveryValueLimit\u003c/code\u003e sets the maximum number of values that can be included for each discovered facet.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003edepth\u003c/code\u003e defines how many of the search results will be used to check for potential facets to discover.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003enewBuilder()\u003c/code\u003e and \u003ccode\u003enewBuilder(FacetOptions options)\u003c/code\u003e are static methods used to construct a \u003ccode\u003eFacetOptions\u003c/code\u003e instance, either empty or based on existing options.\u003c/p\u003e\n"]]],[],null,["# Class FacetOptions (2.0.0)\n\n public final class FacetOptions\n\nA `FacetOptions` represents facet options such as the number of facets to discover\n(`discoveryLimit`), the number of values to be included in each discovered\nfacet (`discoveryValueLimit`), and the depth of the results to check (`depth`).\nNote that discovery is disabled when `discoveryLimit` is zero.\n\n\nFor example, to discover 10 facets with 5 values each over 1000 extended results: \n\n\n FacetOptions facetOption = FacetOptions.newBuilder()\n .setDiscoverLimit(10)\n .setDiscoverValueLimit(5)\n .setDepth(1000)\n .build();\n \nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e FacetOptions \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### newBuilder()\n\n public static FacetOptions.Builder newBuilder()\n\nCreates and returns an empty Builder.\n\n### newBuilder(FacetOptions options)\n\n public static FacetOptions.Builder newBuilder(FacetOptions options)\n\nCreates and returns a Builder that reflects the given options.\n\nMethods\n-------\n\n### getDepth()\n\n public Integer getDepth()\n\nReturns the number of documents from the search result to be analyzed for facet discovery\nor null if unset.\n\n### getDiscoveryLimit()\n\n public Integer getDiscoveryLimit()\n\nReturns the number of facets to be discovered or null if unset.\n\n### getDiscoveryValueLimit()\n\n public Integer getDiscoveryValueLimit()\n\nReturns the maximum number of values for each discovered facet or null if unset.\n\n### toString()\n\n public String toString()\n\n**Overrides** \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)"]]