In the BlurQuery object, add Facet objects to the facet list.  Where the
Facet object contains the query that you want to facet on for example:

bq = new BlurQuery();
bq.addFacet(new Facet("tweets.text:hadoop", Long.MAX_VALUE); // where the
long is the minimum number results in the facet to return.
// So if the value was set to 10, the facet object would stop counting the
facet at 10.  Note: It's very likely that you will get more than your
minimum back.

results = client.query("table",bq);
List<Long> counts = results.getFacetCounts();
long hadoopCount = counts.get(0); // The index of the results will match
the index of the facet object that where in the query.

Hope this helps, let me know if you have anymore questions.

Aaron



On Tue, Sep 18, 2012 at 9:54 AM, Tim Williams <[email protected]> wrote:

> can someone describe how the faceting api works?
>
> Thanks,
> --tim
>

Reply via email to