0.20.1 (latest) 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.12 0.12.3 0.11.14 0.10.0 0.9.1 0.8.1 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.1 0.1.1

    CrowdingSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specification for crowding. Crowding improves the diversity of
search results by limiting the number of results that share the same
field value. For example, crowding on the color field with a
max_count of 3 and mode DROP_CROWDED_RESULTS will return at most 3
results with the same color across all pages.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `field` | `str` The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive. |
| `max_count` | `int` The maximum number of documents to keep per value of the field. Once there are at least max_count previous results which contain the same value for the given field (according to the order specified in `order_by`), later results with the same value are "crowded away". If not specified, the default value is 1. |
| `mode` | `https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1beta.types.SearchRequest.CrowdingSpec.Mode` Mode to use for documents that are crowded away. |

## Classes

### Mode

    Mode(value)

Enum describing the mode to use for documents that are
crowded away. They can be dropped or demoted to the later pages.