public void setFacet(String facet) {
        this.facet = facet;
    }
<p>
Specifies one or more fields for which to get facet information, and options that control how the facet
information is returned. Each specified field must be facet-enabled in the domain configuration. The fields and
options are specified in JSON using the form
<code>{"FIELD":{"OPTION":VALUE,"OPTION:"STRING"},"FIELD":{"OPTION":VALUE,"OPTION":"STRING"}}</code>.
</p>
<p>
You can specify the following faceting options:
</p>
<ul>
<li>
<p>
<code>buckets</code> specifies an array of the facet values or ranges to count. Ranges are specified using the
same syntax that you use to search for a range of values. For more information, see <a
href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html"> Searching for a Range
of Values</a> in the <i>Amazon CloudSearch Developer Guide</i>. Buckets are returned in the order they are
specified in the request. The <code>sort</code> and <code>size</code> options are not valid if you specify
<code>buckets</code>.
</p>
</li>
<li>
<p>
<code>size</code> specifies the maximum number of facets to include in the results. By default, Amazon
CloudSearch returns counts for the top 10. The <code>size</code> parameter is only valid when you specify the
<code>sort</code> option; it cannot be used in conjunction with <code>buckets</code>.
</p>
</li>
<li>
<p>
<code>sort</code> specifies how you want to sort the facets in the results: <code>bucket</code> or
<code>count</code>. Specify <code>bucket</code> to sort alphabetically or numerically by facet value (in
ascending order). Specify <code>count</code> to sort by the facet counts computed for each facet value (in
descending order). To retrieve facet counts for particular values or ranges of values, use the
<code>buckets</code> option instead of <code>sort</code>.
</p>
</li>
</ul>
<p>
If no facet options are specified, facet counts are computed for all field values, the facets are sorted by facet
count, and the top 10 facets are returned in the results.
</p>
<p>
To count particular buckets of values, use the <code>buckets</code> option. For example, the following request
uses the <code>buckets</code> option to calculate and return facet counts by decade.
</p>
<p>
<code> {"year":{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,}"]}} </code>
</p>
<p>
To sort facets by facet count, use the <code>count</code> option. For example, the following request sets the
<code>sort</code> option to <code>count</code> to sort the facet values by facet count, with the facet values
that have the most matching documents listed first. Setting the <code>size</code> option to 3 returns only the
top three facet values.
</p>
<p>
<code> {"year":{"sort":"count","size":3}} </code>
</p>
<p>
To sort the facets by value, use the <code>bucket</code> option. For example, the following request sets the
<code>sort</code> option to <code>bucket</code> to sort the facet values numerically by year, with earliest year
listed first.
</p>
<p>
<code> {"year":{"sort":"bucket"}} </code>
</p>
<p>
For more information, see <a
href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html">Getting and Using Facet
Information</a> in the <i>Amazon CloudSearch Developer Guide</i>.
</p>

@param facet
       Specifies one or more fields for which to get facet information, and options that control how the facet
       information is returned. Each specified field must be facet-enabled in the domain configuration. The
       fields and options are specified in JSON using the form
       <code>{"FIELD":{"OPTION":VALUE,"OPTION:"STRING"},"FIELD":{"OPTION":VALUE,"OPTION":"STRING"}}</code>.</p>
       <p>
       You can specify the following faceting options:
       </p>
       <ul>
       <li>
       <p>
       <code>buckets</code> specifies an array of the facet values or ranges to count. Ranges are specified using
       the same syntax that you use to search for a range of values. For more information, see <a
       href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html"> Searching for a
       Range of Values</a> in the <i>Amazon CloudSearch Developer Guide</i>. Buckets are returned in the order
       they are specified in the request. The <code>sort</code> and <code>size</code> options are not valid if
       you specify <code>buckets</code>.
       </p>
       </li>
       <li>
       <p>
       <code>size</code> specifies the maximum number of facets to include in the results. By default, Amazon
       CloudSearch returns counts for the top 10. The <code>size</code> parameter is only valid when you specify
       the <code>sort</code> option; it cannot be used in conjunction with <code>buckets</code>.
       </p>
       </li>
       <li>
       <p>
       <code>sort</code> specifies how you want to sort the facets in the results: <code>bucket</code> or
       <code>count</code>. Specify <code>bucket</code> to sort alphabetically or numerically by facet value (in
       ascending order). Specify <code>count</code> to sort by the facet counts computed for each facet value (in
       descending order). To retrieve facet counts for particular values or ranges of values, use the
       <code>buckets</code> option instead of <code>sort</code>.
       </p>
       </li>
       </ul>
       <p>
       If no facet options are specified, facet counts are computed for all field values, the facets are sorted
       by facet count, and the top 10 facets are returned in the results.
       </p>
       <p>
       To count particular buckets of values, use the <code>buckets</code> option. For example, the following
       request uses the <code>buckets</code> option to calculate and return facet counts by decade.
       </p>
       <p>
       <code> {"year":{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,}"]}} </code>
       </p>
       <p>
       To sort facets by facet count, use the <code>count</code> option. For example, the following request sets
       the <code>sort</code> option to <code>count</code> to sort the facet values by facet count, with the facet
       values that have the most matching documents listed first. Setting the <code>size</code> option to 3
       returns only the top three facet values.
       </p>
       <p>
       <code> {"year":{"sort":"count","size":3}} </code>
       </p>
       <p>
       To sort the facets by value, use the <code>bucket</code> option. For example, the following request sets
       the <code>sort</code> option to <code>bucket</code> to sort the facet values numerically by year, with
       earliest year listed first.
       </p>
       <p>
       <code> {"year":{"sort":"bucket"}} </code>
       </p>
       <p>
       For more information, see <a
       href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html">Getting and Using Facet
       Information</a> in the <i>Amazon CloudSearch Developer Guide</i>.
aws-java-sdk-cloudsearch/src/main/java/com/amazonaws/services/cloudsearchdomain/model/SearchRequest.java