Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FacetBucket

import type { FacetBucket } from "https://googleapis.deno.dev/v1/cloudsearch:v1.ts";

A bucket in a facet is the basic unit of operation. A bucket can comprise either a single value OR a contiguous range of values, depending on the type of the field bucketed. FacetBucket is currently used only for returning the response object.

interface FacetBucket {
count?: number;
filter?: Filter;
percentage?: number;
value?: Value;
}

§Properties

§
count?: number
[src]

Number of results that match the bucket value. Counts are only returned for searches when count accuracy is ensured. Cloud Search does not guarantee facet counts for any query and facet counts might be present only intermittently, even for identical queries. Do not build dependencies on facet count existence; instead use facet ount percentages which are always returned.

§
filter?: Filter
[src]

Filter to be passed in the search request if the corresponding bucket is selected.

§
percentage?: number
[src]

Percent of results that match the bucket value. The returned value is between (0-100], and is rounded down to an integer if fractional. If the value is not explicitly returned, it represents a percentage value that rounds to 0. Percentages are returned for all searches, but are an estimate. Because percentages are always returned, you should render percentages instead of counts.

§
value?: Value
[src]