Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec (v2.7.0)

Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec.

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.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#field

def field() -> ::String
Returns
  • (::String) — The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.

#field=

def field=(value) -> ::String
Parameter
  • value (::String) — The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.
Returns
  • (::String) — The field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.

#max_count

def max_count() -> ::Integer
Returns
  • (::Integer) — 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.

#max_count=

def max_count=(value) -> ::Integer
Parameter
  • value (::Integer) — 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.
Returns
  • (::Integer) — 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

def mode() -> ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode
Returns

#mode=

def mode=(value) -> ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec::Mode
Parameter
Returns